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
rotate zoom - broke after update
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: rotate zoom - broke after update
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
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
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. )
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. )
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: rotate zoom - broke after update
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.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: rotate zoom - broke after update
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.
snibgo's IM pages: im.snibgo.com