What is JPG- or JPEG-Format?

JPG is the abbreviation for JPEG, shortened to three letters as it is usual for the ending of file names. JPEG (Joint Photographic Experts Group) is a cooperation of companies and research institutes that has published this standard for digital images in 1992.

file sizes of TIF-, BMP- PNG- und JPG-FormatThe key advantage of the JPG format is that it produces small files because of compression of image data, i.e. mathematical processes reduce the volume of data when it is written into a file and a reverse process has to be applied when opening a file to restore the image.

Without compression each pixel of a color image would need three bytes for the three color components red, green and blue. An image of e.g. 10 megapixels would need about 30 MByte of data as you get it in the so called „bitmap“ format (.bmp). JPG files need a fraction of this.

It is the speciality of the JPG format that its logic for compression is adapted to the digital photos, i.e. it is suitable for

  • images with the full range of 16,7 million colors (from three components of red, green and blue with 256 levels each)
  • images with rather continuous changes in color and brightness between neighboring pixels as it is typical for photos.

The compression works differently depending on the subject; images rich in detail cannot be compressed as well as others with large unstructured areas.

The compression results in a visible or invisible loss of image quality. This means after opening (=de-compression) of a JPG-file you get an image which is not exactly the same as the original one.

A in PNG- und JPG format, enlarged four timesThis is most visible in images with sharp edges, e.g. letters or black-and-white drawings. For such images other file formats are better suited.

On the right an example in low JPG quality, exaggerating the loss in quality.

The JPG format is a well established worldwide standard, each digital camera can deliver images in JPG format and in the internet it is also the common standard to exchange photos.