GIF format is a lossless compression technique and it supports only 256 colors.
GIF is better than JPEG for images with only a few distinct colors, such as line drawings, black and white images and small text that is only a few pixels high.
JPEG images support 16 million colors and are best suited for photographs and complex graphics.
JPG does not work well on line drawings, lettering or simple graphics because there is not a lot of the image that can be thrown out in the lossy process, so the image loses clarity and sharpness.
here's more info:http://www.siriusweb.com/tutorials/gifvsjpg/