JPGs have become the de facto standard image of the internet because they can be compressed so much.

Particularly back in the days of dial-up internet, JPGs were the only viable way to send image information.

The Joint Photographic Experts Group developed lossless JPG technology to combat this serious problem of quality degradation.

What’s the Difference Between JPG, PNG, and GIF?

JPGs support 24-bitRGBand CMYK, as well as 8-bit Grayscale.

I personally do not recommend using CMYK color spaces in JPGs.

It’s also important to note that Grayscale JPGsdo not compressnearly as much as color ones do.

KeizersgrachtReguliersgrachtAmsterdam compressed

GIF stands for “Graphics Interchange Format” and employs the same lossless LZW compression that TIFF images use.

There are, however, standard color palettes, like the “Web Safe” palette.

Apart from support for transparency, GIF also is supports animations, limiting every frame to 256 preselected colors.

24bitJPG

GIF is not ideal for modern photography, nor image storage.

At small sizes with very limited color tables, GIF images can be smaller than JPG files.

But at most ordinary sizes, JPG compression will create a smaller image.

JPGcompressed

They are largely out of date, useful only to create dancing babies or to sometimes create rough transparencies.

It was developed as an open alternative to GIF, which used the proprietary LZW compression algorithm discussed earlier.

Notice how the transparent color changes and blends with the background.

8bit

Right-nudge the image to see.

This is actually one image that is on four different background colors.

PNG supports 8-bit color like GIF, but also supports 24-bit color RGB, like JPG does.

DANCING_BABY

They are also non-lossy files, compressing photographic images without degrading image quality.

Which to use?

Note that the file sizes increase in this same direction.

HTG

8-bit PNG is an option, but GIF is smaller.

In short:

Image of Keizersgracht, in Amsterdam byMassimo CatarinellaviaWikipedia, released underCreative Commons license.

Derivative images available under the same license.

JPG compressed

I don’t care to know who created the dancing baby.

GIF8bit.png

/wordpress/wp-content/uploads/2010/10/PNG8bit.png

/wordpress/wp-content/uploads/2010/10/JPGfull.png

PNGfull.png