Understanding technical aspects and working with a .JPG File ?>

Understanding technical aspects and working with a .JPG File

Joint Photographic Experts Group (JPEG), is the name of an expert committee that created a standard of compression and encoding for files and still images. This committee was integrated from the beginning by the merger of several groups in an attempt to share and develop their expertise in digital imaging. ISO, three years earlier (April 1983), had started its investigations in the area.

Besides being a compression method is often regarded as a file format. JPEG/Exif is the most common image format  used by digital cameras and other devices for image capture, along with JPG/JIFF, which is also another format for storing and transmitting photographic images on the World Wide Web . These variations in formats often not distinguished, and are called “JPEG”. Files of this type are usually named with the .jpg extension.

JPEG compression

The JPEG format usually uses a lossy compression to reduce the size of image files, this means that when decompressing or display the image does not exactly get the same image before compression. There are also three variants of the JPEG standard that compresses the image without loss of data: JPEG2000, JPEG-LS and Lossless JPEG.  The JPEG compression algorithm is based on two visual phenomena of the human eye: one is the fact that it is much more sensitive to changes in luminance than chrominance. The other is that more easily note small changes in brightness in homogeneous zones in areas where the variation is large; for example at the edges of the bodies of objects.


Many of the options of  JPEG standard are little used. This is a brief description of one of the many methods commonly used to compress images when applied to an input image with 24 bits per pixel (eight per red, green, and blue, or also said “8 bits per channel”) . This particular option is a lossy compression method.

Color space transformation

It begins converting the image from the RGB color model to another called YUV or YCbCr. This color space is similar to that used color systems PAL and NTSC television, but it is much more like television system MAC (Multiplexed Analog Components).


The JPEG algorithm transforms the image into square of 8 × 8, and then stores each of these as a linear combination or sum of the 64 frames forming the image; this allows selectively remove details. For example, if a box has a value close to 0, it can be eliminated without affecting much on quality.

Discrete cosine transform (DCT)

Each component of the image is divided into small blocks of 8 × 8 pixels which are processed almost independently, which significantly decreases the calculation time. This is the typical grid formation, which becomes visible in saved images with high compression. If the image suffered color sub-sampling, colors in the final image would block 8×16 and 16×16 pixels, as were 4: 2: 2 or 4: 2: 0.

Noise produced by compression

The result after compression may vary, depending on the aggressiveness of the divisors of the quantization matrix, the greater the value of these dividers, more coefficients become zero, and the image is compressed. But higher compressions produce more noise in the image, worsening their quality. An image with a high compression (1% -15%) can have a much smaller file size, but will have many imperfections will not be interesting, a very low compression (98% -100%) will produce a high quality image, but will such a large size that you may want more than a lossless format like PNG.

Comparison of an image in .JPG and .PNG


Tux copia Tux



As you can see, the image quality is quite remarkable and distinctive between the two formats, however, file sizes are also essentially different.