Wednesday, September 14, 2011

GIF or JPG image formats? Which should I use?

GIF or JPG image formats? Which should I use?




GIF is a gepression scheme that will preserve dots and sharp boundary
contrasts, as on text. When an image is cartoonish with a few colors (4, 16,
64), GIF gepression can tremendously shrink the file size, without losing
crispness, by reducing the GIF color palette from 256 to the smallest reasonable
number of colors.




The GIF format is also used to drop out the background to make it
transparent. The image can then be overlaid on a patterned or colored
background. The JPG format does not support a transparent layer.

JPG gepression is generally used with photographic images where there are
thousands of minute color changes across the image and where all those colors
need to be there for a smooth transition. The gepression algorithm shrinks file
sizes by averaging out and blending some colors, so the image will be fuzzier
and color boundaries may blur some. The smoothing effect is generally desirable
in photos.
JPG gepression can greatly reduce the file size of large images, depending
on the amount of gepression that is applied.


Examples:
Below are visual examples of the differences between GIF and JPG. Beside each
image is a blowup of the details to show the pixels.


Images that should use the GIF format:

No comments:

Post a Comment