JPG Vs. JPEG: What's The Difference Between These Image File Formats?

JAKARTA - Not all image file formats are created equal. In fact, many of these image files are created to address problems that existing formats cannot solve. JPEG, for example, arises because the image file size takes up too much storage space.

Believe it or not, the JIF, JPEG, and JPG file extensions refer to more or less the same thing. To understand why the file format has so many names, we need to uncover a bit of convoluted history.

What are JPEGs?

The acronym JPEG stands for Joint Photographic Experts Group, a file type named after the sub-committee that helped create the JPEG Interchange Format (JIF) standard. It was first issued in 1992 by the International Organization for Standardization (ISO).

A JPEG is a 24-bit still raster image, with eight bits in each channel of the RGB color model. This leaves no room for the alpha channel, which means that while JPEGs can support more than 16 million colors, they cannot support transparency.

When an image is saved as a JPEG, some of its data is discarded in a process known as lossy file compression. In turn, images take up 50-75 percent less storage space (compared to older formats like BMP) with little or no noticeable loss of image quality.

JPEG compression is based on a lossy image compression technique called discrete cosine transformation (DCT), which was first proposed by electrical engineer Nasir Ahmed in 1972.

What is JIF?

You can think of a JIF file as a JPEG in its "purest" form. However, the format is not used much anymore as it presents some frustrating limitations. For example, the definition of the color and pixel aspects of the JIF causes compatibility issues between the encoder and decoder (viewers).

Fortunately, this issue was later addressed with other "additional" standards built on top of JIF. The first is the JPEG File Exchange Format (JFIF), and later, the Exchangeable image file format (Exif) and the ICC color profile.

JPEG/JFIF is today's most popular format for storing and transmitting photographic images on the internet, while JPEG/Exif is for digital cameras and other image capture devices. Most people don't differentiate between these variations and simply refer to them as JPEGs.

What is JPG2 or JPF?

In 2000, the JPEG group released another image file format called JPEG 2000 (file extensions are JPG2 and JPF). It was meant to be the successor to JPEG, but it wasn't quite as popular. Even when its sophisticated encoding methods often result in better quality images.

The JPEG 2000 file format fails for several reasons. First, it is based on completely new code and is therefore not JPEG compatible. Also, handling JPEG 2000 files required more memory to process, which was a deal breaker at the time. After all, the average computer at that time only had 64 MB of memory.

JPEG 2000 has seen a bit of a resurgence now that computer hardware, in general, has improved tremendously over the last 20 years, but the file format is still very underused. The only internet browser that supports JPEG 2000 files at the time of this writing is Safari.

JPEG vs. JPG

Early versions of Windows (specifically the MS-DOS 8.3 and FAT-16 file systems) had a maximum limit of 3 letters in terms of file extension length. JPEG should be shortened to JPG so as not to exceed the limit. Mac and Linux computers never had such a thing, so users would continue to save images as JPEGs.

Popular image editing programs that work across various operating systems, such as Photoshop and Gimp, will eventually set the default JPEG file extension to JPG in an effort to minimize confusion.

That's how we got two file extensions for the same format: JPEG and JPG. When choosing to save your image, there is no difference between the two.