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?
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
No, GIF for static images is a waste of bandwith. PNG can almost always be much smaller than GIF
GIF has a very poor compression algorithm, but has a smaller header.
PNG has a few bytes more of overhead for extensible metadata, but has a 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.
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.
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.
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.