Mobile app version of vmapp.org
Login or Join
Welton168

: PNG vs GIF for 1 bit transparency Is there any reason for using GIF instead of PNG when the image requires only 1 bit transparency (either on or off) and of course no animation is required?

@Welton168

Posted in: #Compression #ImageFormat #Png

Is there any reason for using GIF instead of PNG when the image requires only 1 bit transparency (either on or off) and of course no animation is required?

thanks

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton168

4 Comments

Sorted by latest first Latest Oldest Best

 

@Nickens508

No, GIF for static images is a waste of bandwith. PNG can almost always be much smaller than GIF


GIF has very poor compression algorithm, but has smaller header.
PNG has few bytes more of overhead for extensible metadata, but has superior compression algorithm.


So the larger the image, the bigger advantage PNG has. Basically only images like 1x1 spacer are going to be smaller in GIF.

It doesn't matter whether image has transparency or not — in every case PNG can compress pixels better.

However, there are programs that don't fully take advantage of PNGs compression capabilities and Photoshop is one of them.

You can fix Photoshop's poor PNG compression with a PNG optimizer such as PNGOUT or ImageOptim.

10% popularity Vote Up Vote Down


 

@Caterina889

If you're worried about size, GIF tends to be a bit smaller (it depends, of course).

Although, I prefer PNGs because of their versatility. I like to keep it consistent, so all my (static raster) images are in PNG.

10% popularity Vote Up Vote Down


 

@LarsenBagley460

PNG is similar to GIF in many ways but even better in others. It is lossless like GIF but supports 8 and 24 bit color, unlike GIF which only supports 8. PNG supports one-color and alpha transparency, whereas GIF only supports one-color transparency. PNG uses various compression filters to minimize overall image size and can apply different filters on a per-line basis to achieve higher compression. The big attraction to PNGs is its ability to do alpha transparency.

They both work better with large lines of the same pattern or color.

So no great difference for 1 bit transparency whether you use gif or png.

10% popularity Vote Up Vote Down


 

@Nimeshi706

GIF is a smaller size than PNG. I hate GIF personally because I use larger bit transparency. Hope this is the answer to your question.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme