Page 1 of 1
Less weight
Posted: 2010-12-13T11:27:04-07:00
by lleoun
Hi all,
I'm doing this:
$cmd = "convert -delay 300 -loop 0 ".$path."*.jpg ".$path."final.gif";
exec($cmd,$erroer);
And the result is great but for the weight: 500kb, what is way too heavy for a gif
(
How can I lighten the gif?
Thanks a ton!!
Re: Less weight
Posted: 2010-12-13T11:50:37-07:00
by fmw42
Re: Less weight
Posted: 2010-12-13T23:12:52-07:00
by anthony
A JPG is a single image. Most GIF optimizations are for multi-image GIF, which are typically (not always) animations.
For single image GIF is a pallette image and is not really designed for LARGE images but small 'cartoon' or 'limited color' images like icons, and diagrams. If you are converting a large photo -- the result will be large and generally not very good looking!
Re: Less weight
Posted: 2010-12-14T01:38:53-07:00
by lleoun
Please, don't tell me that there's no solution .. I've built a whole project on the basis of a normal weight for a gif as a final image ...
Any tricks? Anything I can do at least to take some weight out?
Thanks!
Re: Less weight
Posted: 2010-12-14T02:22:23-07:00
by lleoun
Guys, some advance!
This:
$cmd = "convert -deconstruct -delay 300 -loop 0 ".$path."*.jpg ".$path."final.gif";
exec($cmd,$erroer);
halfs the size, now it is 221 KB, almost there!
Re: Less weight
Posted: 2010-12-14T11:52:26-07:00
by fmw42
again, see the gif animation optimations page listed above.
Re: Less weight
Posted: 2010-12-14T19:08:32-07:00
by anthony
If it is an animation (not a single image)
You can try -layers Optimize or at least -layers OptimizeTransparency
Other than that using a common color pallete, reduced colors, ordered dithering etc can also help, depending on how related the images are.
For examples of this see Video to GIF
http://www.imagemagick.org/Usage/video/