Page 1 of 1

Extending Whilst Preserving Gif Transperancy

Posted: 2010-07-08T09:29:06-07:00
by STT
G'day,
I have a folder of ~100 animated .gif images with various transparency colours that I wish to enlarge into 40x40 images with the existing image centred.

Using "convert <image> -gravity center -extend 40x40 <newImage>" works but imposes a white background.
"convert <image> -gravity center -extend 40x40 -background none <newImage>" and
"convert <image> -gravity center -extend 40x40 -background transparent <newImage>" also imposes the background.
How do I do the extension without creating a white background?

Cheers,
STT

Re: Extending Whilst Preserving Gif Transperancy

Posted: 2010-07-08T09:35:30-07:00
by snibgo
Perhaps "-resize" will do what you want.

Re: Extending Whilst Preserving Gif Transperancy

Posted: 2010-07-08T09:37:04-07:00
by fmw42
put the -background color BEFORE the -extent

Re: Extending Whilst Preserving Gif Transperancy

Posted: 2010-07-08T09:43:56-07:00
by STT
snibgo wrote:Perhaps "-resize" will do what you want.
Nah, that would have distorted the images. :P
fmw42 wrote:put the -background color BEFORE the -extent
Cheers, that did exactly what I wanted.