diff --git a/rtgui/crop.cc b/rtgui/crop.cc index a727c9bd1..4005b73e0 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -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