- Joined
- Jan 27, 2000
- Messages
- 615
Originally posted by ZENGHOST
When do you need to use .GIF as opposed to .JPG?
I hope we don't get in trouble for being off topic, but here goes.
Two obvious times you'd use the GIF format are when you have a small image that requires a transparent background, or when you need to use animation.
e.g.
Transparent background -

Animation -

I know you know that, and I'm just offering it to make the discussion more complete, not to insult your intelligence.
Not as readily obvious is that the JPEG format, because of its lossy compression algorithm, does not do well with large areas of solid color.
e.g.

GIF format. Filesize approximately 2.7K

JPEG format. Compressed to a Filesize of approximately 2.7K
You can see that the JPEG image has lost a lot of quality due to the "lossy" compression algorithm. I could have used less compression on the JPEG, but at an acceptable level where there were no artifacts, the filesize was twice as big as the one in GIF format.
So, use GIF for small images with transparent backgrounds, animations, or images with large areas of solid color, and generally images with 256 total colors or less. Use JPEG for for photographic images, or images with thousands to millions of colors.