IT ENGLISH BOARD

What’s The Difference Between JPG, PNG And GIF?

Software
Author
author
Date
2019-06-07 20:06
Views
2146

What’s The Difference Between JPG, PNG And GIF?





 

JPG (Joint Photographic Experts Group)

JPG was a filetype developed by the Joint Photographic Experts Group (JPEG) to be a standard for professional photographers. Like the method ZIP files use to find redundancies in files to compress data, JPGs compress image data by reducing sections of images to blocks of pixels or "tiles". JPG compression has the unfortunate side effect of being permanent, however, as the technology for the file was created for storing large photographic image files in surprisingly small spaces, and not for photo editing.

JPGs have become the de facto standard image of the internet because they can be compressed so much. A typical JPG can be compressed at a ratio of anywhere from 2:1 to as high as 100:1, depending on your settings. Particularly back in the days of dial-up internet, JPGs were the only viable way to send image information.

However, because of the lossy nature of JPG, it is not an ideal way to store art files. Even the highest quality setting for JPG is compressed,and will change the look of your image, if only slightly. JPG is also not an ideal medium for typography, crisp lines or even photographs with sharp edges, as they are often blurred or smeared out by anti-aliasing. What is potentially worse is that this loss can accumulate - saving multiple versions of artwork can cause degradation with every save. Even so, it is common to see these things saved as JPG, simply because the filetype is so ubiquitous.

The Joint Photographic Experts Group developed lossless JPG technology to combat this serious problem of quality degradation. However, because of dial-up speeds and general lack of interest in high quality, non-degrading files, the JPG-LS standard never caught on.

It is possible to download plugins that allow users to open and save the lossless JPG2000, and some programs, like Apple's Preview application, can read and save JPG2000 directly out of the box.

JPGs support 24-bit RGB and CMYK, as well as 8-bit greyscale. I personally do not recommend using CMYK colour spaces in JPGs. It's also important to note that greyscale JPGs do not compress nearly as much as colour ones do.

GIF (Graphics Interchange Format)

GIF, like JPG, is an older filetype, and one generally associated with the internet as opposed to photography. GIF stands for "Graphics Interchange Format" and employs the same lossless LZW compression that TIFF images use. This technology was once controversial (for patent enforcement issues) but has become an accepted format since all patents have expired.

GIF is by nature an 8-bit colour file, meaning they are limited to a palette of 256 colours, which can be picked from the RGB colour model and saved to a Colour Look Up Table (CLUT), or simply "Colour Table". There are, however, standard colour palettes, like the "Web Safe" palette. An important note is that greyscale images are by nature an 8-bit palette, so saving them as GIF is fairly ideal.

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

While GIF is not lossy like JPG, conversion to 8-bit colour distorts many images, using dither filters to optically blend or "diffuse" colours, similar to halftone dots or pointillism. This can radically alter an image for the worse, or, in some cases, be used to create an interesting effect.

Because of this non-lossy format, GIF can be used to keep tight lines on typography and geometric shapes, although these things are better suited to vector graphic files like SVG or the Adobe Illustrator native format, AI.

GIF is not ideal for modern photography, nor image storage. At small sizes with very limited colour tables, GIF images can be smaller than JPG files. But at most ordinary sizes, JPG compression will create a smaller image. They are largely out of date, useful only to create dancing babies or to sometimes create rough transparencies.

PNG (Portable Network Graphics)


PNG stands for Portable Network Graphics (or, depending on whom you ask, the recursive "PNG-Not-GIF"). It was developed as an open alternative to GIF, which used the proprietary LZW compression algorithm discussed earlier. PNG is an excellent filetype for internet graphics, as it supports transparency in browsers with an elegance that GIF does not possess. Notice how the transparent colour changes and blends with the background. Right-click the image to see. This is actually one image that is on four different background colours.

PNG supports 8-bit colour like GIF, but also supports 24-bit colour RGB, like JPG does. They are also non-lossy files, compressing photographic images without degrading image quality. PNG tends to be the biggest of the three filetypes and isn't supported by some (usually older) browsers.

In addition to being an excellent format for transparency, the non-lossy nature of 24-bit PNG is ideal for screenshot software, allowing pixel for pixel reproduction of your desktop environment.

Which to use?


From left to right, these files are: 24-bit JPG Compressed, 8-bit GIF, 8-bit PNG, Full Quality 24-bit JPG and 24-bit PNG. Note that the file sizes increase in this same direction.

PNG is the largest image type for bigger images, often containing information you may or may not find useful, depending on your needs. 8-bit PNG is an option, but GIF is smaller. Neither are optimal options for photography, as JPG is much smaller than lossless PNG with only minimal loss of quality. And for storage of high-resolution files, JPG compresses to tiny proportions, with quality loss only visible on close inspection.

In short: PNG is good option for transparency and non-lossy, smaller files. Larger files, not so much, unless you demand non-lossy images. GIF is largely a novelty and only useful for animation, but can produce small 8-bit images. JPG is still the king for photographs and photo-like images on the internet, but be careful, as your file can degrade with every save.
Total Reply 0

Total 104
Number Title Author Date Votes Views
23
WordPress. How to hide time and date from the post page
author | 2019.06.10 | Votes 0 | Views 2205
author 2019.06.10 0 2205
22
What’s The Difference Between JPG, PNG And GIF?
author | 2019.06.07 | Votes 0 | Views 2146
author 2019.06.07 0 2146
21
How to Migrate your Site with All-in-One WP Migration
author | 2019.06.07 | Votes 0 | Views 2472
author 2019.06.07 0 2472
20
How do I Stop My Android Tablet from Sleeping?
author | 2019.06.04 | Votes 0 | Views 2148
author 2019.06.04 0 2148
19
How to keep your Android phone's screen on longer
author | 2019.06.04 | Votes 0 | Views 2557
author 2019.06.04 0 2557
18
Things You MUST DO Before Changing WordPress Themes (1)
inrokhah | 2019.05.29 | Votes 0 | Views 2379
inrokhah 2019.05.29 0 2379
17
How to Remove Author Name from WordPress Posts (2 Easy Ways)
inrokhah | 2019.05.29 | Votes 0 | Views 2142
inrokhah 2019.05.29 0 2142
Re:How to Remove Author Name from WordPress Posts (2 Easy Ways)
inrokhah | 2019.05.29 | Votes 0 | Views 2145
inrokhah 2019.05.29 0 2145
16
Remove sidebar / widgets from WooCommerce shop page (13)
inrokhah | 2019.05.26 | Votes 0 | Views 2284
inrokhah 2019.05.26 0 2284
15
Online documentation: Buttons Shortcode and Widget plugin
inrokhah | 2019.05.26 | Votes 0 | Views 2502
inrokhah 2019.05.26 0 2502
14
Buttons Shortcode and Widget
inrokhah | 2019.05.26 | Votes 0 | Views 2614
inrokhah 2019.05.26 0 2614
New