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!!
Less weight
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Less weight
see animation optimizations at http://www.imagemagick.org/Usage/anim_opt/
or other optimization tools http://www.imagemagick.org/Usage/formats/#gif_non-im
or other optimization tools http://www.imagemagick.org/Usage/formats/#gif_non-im
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Less weight
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!
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!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Less weight
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!
Any tricks? Anything I can do at least to take some weight out?
Thanks!
Re: Less weight
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!
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!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Less weight
again, see the gif animation optimations page listed above.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Less weight
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/
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/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/