Page 1 of 1

extent & alpha background

Posted: 2011-10-28T04:45:21-07:00
by errx
I have image with alpha background. But after extent it

Code: Select all

convert -extent 100x100 in.gif out.gif
my background isnt transparent anymore. How can I fix it?

Re: extent & alpha background

Posted: 2011-10-28T09:32:21-07:00
by fmw42
errx wrote:I have image with alpha background. But after extent it

Code: Select all

convert -extent 100x100 in.gif out.gif
my background isnt transparent anymore. How can I fix it?

First put the input image right after convert, then specify -background color and -gravity posititioning. Try

convert in.gif +repage -gravity center -background none -extent 100x100 out.gif

The +repage is there in case your gif has a virtual canvas larger than the image.