In reply to this post on the Ubuntu forums (regarding imagemagick's convert, but Phatch has the shows the same behavior) I made a small change to the Scale action.
53a54 > fields[_t('Keep Orientation')] = self.BooleanField(False) 70,71c71,81 < #check if image size has changed < scaleDownOnly = self.get_field('Scale down only',info) --- > > scaleDownOnly = self.get_field('Scale down only',info) > keepOrientation = self.get_field('Keep Orientation',info) > > # swap x1 and y1 values if necessary for "keep orientation" > if (keepOrientation and ((x0 < y0 and x1 > y1) > or (x0 > y0 and x1 < y1))): > temp = x1 > x1 = y1 > y1 = temp >
The problem in short:
when resizing a bunch of picture to 600x400 for example (using convert -resize 600x400), the pictures which are "landscape" oriented will effectively be resized to these dimensions, whilst the "portrait" oriented pics will be resized to 269x400, instead of 400x600 as expected
When the option "keep orientation" is selected, the long side of the picture will be resized according to the largest value for width/height, and the short side will be resized according to the smallest value.