hi all,

is there any nice article in outside or in here for how to optimizing .gif format for web graphic? or maybe you can give any info how to optimize .gif format in this thread.

i very need this tutorial, usually i always use .png for any web graphic but .png have problem in IE, especially in transparent image.

thanks

Dani AI

Generated

As noted, PNG is often preferred for rich artwork because it supports full alpha, but GIF still makes sense for flat-color UI elements and simple animations. GIF is an indexed format (max 256 colors) with only binary transparency (on/off), so the biggest wins come from reducing colors, removing redundant pixels, and optimizing animation frames rather than "saving as GIF" alone. A concise reference on image format tradeoffs is available from MDN: Image formats and when to use them.

Practical, repeatable checklist:

  • Reduce pixel dimensions and crop tightly; many bytes are wasted on empty margins.
  • Reduce the palette to 64/32/16 colors and use an adaptive palette tuned to the image.
  • Tune or disable dithering (diffusion dithering preserves gradients but can increase size).
  • Strip metadata and avoid interlacing for small UI images.
  • For animations: use a single global palette, store only changed areas between frames, lower frame rate, and remove duplicate frames.

Common command-line optimizers are especially effective; for example, gifsicle is simple and fast and ImageMagick can quantize and dither during conversion. Example commands:

gifsicle --optimize=3 --colors 64 input.gif -o output.gif

magick input.png -colors 64 -dither None output.gif

For animated content consider modern alternatives: APNG or animated WebP give more colors and smaller files, and SVG/CSS can replace raster UI elements entirely for crisp, tiny assets. As and implied, editor export settings matter, but combining palette reduction, frame/area optimization, and a good optimizer (gifsicle/ImageMagick or an online tool) will yield the best practical GIF file-size reductions.

Recommended Answers

All 2 Replies

Member Avatar for Member #46692

Just use something like the gimp to save as a .gif with export integretation set to 100%. It won't be as great as .png but it is certainly better than saving it as a .gif in MS Paint say.

if you have photoshop, ctrl+shift+alt+s does the trick, have a choice between png and gif

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.