Page 1 of 1
rotate zoom - broke after update
Posted: 2018-10-19T09:16:00-07:00
by dognose
I'm using this command to rotate and zoom in on an image.
convert image.jpg -background transparent -gravity center -scale 200% -rotate 45 -crop800x600+0+0 -trim +repage out.jpg
It works in IM 6.7.2-7
but with IM 6.7.8-9 it no longer holds to the center of the image and the image is cropped weird.
What changed in the update, and how do I fix it?
Input - Output and output bad..
https://imgur.com/a/z2YBpAf
Re: rotate zoom - broke after update
Posted: 2018-10-19T09:25:22-07:00
by fmw42
IM 6.7.8.9 was during major changes to Imagemagick that did not finish until about 6.8.5.x. So I would upgrade to a higher version. If you are on Linux, then the version number is not as important as the version date, since Linux does not always change the version number when they patch.
Try putting +repage after the crop and after the trim. If that does not help, then you really need to upgrade
Re: rotate zoom - broke after update
Posted: 2018-10-19T12:43:09-07:00
by dognose
The added +repage after the rotate seems to have fixed it.
I've also tried this on IM 7.0.8, and it had the same problem. (Still trying to figure out what all else has changed with that update. )
Re: rotate zoom - broke after update
Posted: 2018-10-19T12:45:55-07:00
by fmw42
The proper syntax has always been to add +repage after a crop or after a trim. IM 6 is more forgiving or syntax issues. IM 7 is very strict about using proper syntax.
Re: rotate zoom - broke after update
Posted: 2018-10-19T13:28:28-07:00
by snibgo
The need for "+repage" has changed over the years, mostly because canvas dimensions and offsets have become more logical. A recent change is that "-append" and "+append" take the canvas from the first image, so we now often need "+repage" afterwards.