: GIF vs PNG which to use? For the image title of my website medium-small(150x50) white background with some effects on title (example: google title image) I saved the image in .gif and .png
For the image title of my website medium-small(150x50) white background with some effects on title (example: google title image)
I saved the image in .gif and .png with result:
.gif size = 3.09 kB
.png size = 7.59 kB
The .png is 2x bigger than .gif.
Everyone are saying me to use .PNG, but why I should use it if .gif are better
More posts by @Gonzalez347
5 Comments
Sorted by latest first Latest Oldest Best
If you want to be nice to IE6 (or heaven forbid earlier) and not worry about png fixes I would use gif. But then who wants to be nice to IE6 any more? :)
PNG almost always gives better compression than GIF, but you need to make sure you're saving the image as an 8-bit PNG. Often graphics programs will save as a 24-bit PNG, which may be why you're seeing the results you are. If you say what program you are using we may be able to advise how to save as an 8-bit PNG.
You can also run the resulting file through either pngout or pngcrush which will reduce the file size even further.
Really the only reason to use GIF over PNG these days is if you need animation.
PNG images allow for Alpha and GIF images do not. So if you have any fading effects where you want the background to be seen through your image then you want to go with PNG.
Also, PNG images with alpha require extra CSS coding in order to appear correctly if they have alpha.
Apparently png either matches or gets better compression then gif.
Try using these tools. The first is from yahoo the 2nd i think i heard about more then once.
Use the format that works best for you. Each format has its strengths and weaknesses but when multiple formats offer you the same image quality then let size be the determining factor. In this case GIF wins. Just keep in mind this won't always be the case so you should always check to see which one suits the current image best and don't lock yourself into one format just because it was better that one time.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.