Crop Animated Gif with xc:transparent and -composite
Posted: 2013-11-08T11:11:20-07:00
Hi all,
thanks a lot for this library, it has saved me the life many times!
I have a script that puts the original image into a bigger area, filling the new empty space with a transparency:
This is the script:
To do that I have to use the -composite option, but unfortunately this let the image loose the animation. I can see the first frame only.
I tried using -coalesce, but nothing has changed.. Someone know how can I preserve the original animation?
I think I have to change the script a little bit and clone the empty background in all of the image frames, but I really don't know how to do that...
Any help is appreciate!
Thank's a lot! Davide.
thanks a lot for this library, it has saved me the life many times!
I have a script that puts the original image into a bigger area, filling the new empty space with a transparency:
This is the script:
Code: Select all
convert image.gif -resize 300x250 -size 300x250 xc:transparent +swap -gravity center -composite image-small.gif
I tried using -coalesce, but nothing has changed.. Someone know how can I preserve the original animation?
I think I have to change the script a little bit and clone the empty background in all of the image frames, but I really don't know how to do that...
Any help is appreciate!
Thank's a lot! Davide.