Fixing issue #407 (Wrong crop rectangle saved)

This commit is contained in:
Hombre
2010-12-14 21:27:50 +01:00
parent aa63667640
commit 5fe7719467

View File

@@ -351,7 +351,13 @@ void Crop::trim (ProcParams* pp, int ow, int oh) {
int xmin = pp->crop.x;
int ymin = pp->crop.y;
if (xmin > maxw || ymin > maxh) {
if (pp->coarse.rotate == 90 || pp->coarse.rotate == 270) {
int tmp = oh;
oh = ow;
ow = tmp;
}
if (xmin > ow || ymin > oh) {
// the crop is completely out of the image, so we disable the crop
pp->crop.enabled = false;
// and we set the values to the defaults