Fixing issue #407 (Wrong crop rectangle saved)
This commit is contained in:
@@ -351,7 +351,13 @@ void Crop::trim (ProcParams* pp, int ow, int oh) {
|
|||||||
|
|
||||||
int xmin = pp->crop.x;
|
int xmin = pp->crop.x;
|
||||||
int ymin = pp->crop.y;
|
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
|
// the crop is completely out of the image, so we disable the crop
|
||||||
pp->crop.enabled = false;
|
pp->crop.enabled = false;
|
||||||
// and we set the values to the defaults
|
// and we set the values to the defaults
|
||||||
|
Reference in New Issue
Block a user