I have a problem with rotating and cropping gif images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
bkstorm
Posts: 8
Joined: 2017-04-27T23:22:30-07:00
Authentication code: 1151

I have a problem with rotating and cropping gif images

Post by bkstorm »

I have an image:
Image
I want to rotate the image through 60 degrees then crop it.
Here is my command:

Code: Select all

convert bird.gif -coalesce -rotate 60 -crop 575x575+0+0! bird-crop.gif
With IM 6.7.2-7, it works just like what I want.
Version: ImageMagick 6.7.2-7 2017-03-22 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Image

With IM 6.7.8-9, it doesn't work. I don't know how to fix this problem. Help me please!
Version: ImageMagick 6.7.8-9 2017-09-20 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
Image
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: I have a problem with rotating and cropping gif images

Post by snibgo »

Your versions of IM are very old. I suggest you upgrade.

You need "+repage" after the rotate. I suggest you also insert "-background none" before the rotate, and "+repage" after the crop.
snibgo's IM pages: im.snibgo.com
bkstorm
Posts: 8
Joined: 2017-04-27T23:22:30-07:00
Authentication code: 1151

Re: I have a problem with rotating and cropping gif images

Post by bkstorm »

Thank you, it works. I will upgrade ImageMagick.
Post Reply