JPEG stands for Joint Photographic Experts Group, the organization that originally created the standard. It is a lossy compression scheme for images which achieves reasonable results. The algorithm achieves its compression by using the discrete cosine transform to encode image information, then rounding the DCT coefficients.

This technique is likely to be rendered obsolete by an algorithm like JPEG-2000, which uses wavelets.
To give a bit more detail on the format: the image to be encoded is divided into 8x8 pixel chunks. Assuming the image is colour, it is converted from RGB colour space to YUV colour space. Each of the three colour components Y, U and V then has a 2D discrete cosine transform applied to it. Since it's an 8x8 block, this DCT has 64 coefficients, but the nice thing is that many of them are close to zero. So, depending on the quality setting, you throw away the coefficients that are closest to zero ... the higher the quality setting, the less coefficients you throw away. You then compress the remaining coefficients using Huffman compression and that's it; you have a JPEG file.

This is also the source of artefacts in uncompressed JPEG images. If you look at a JPEG image closely, especially a poor quality one, you can sometimes see the edges of the 8x8 blocks, where the DCT on one side doesn't match the DCT on the other.

The JPEG image format is best used to compress 24 bit color images with a smooth gradient. Sources of such images would include scanners, digital cameras, and high quality image renders that uses a method such as ray tracing or other methods that produce realistic looking images.

JPEG handles things such as sharp lines and sudden color changes very poorly. An image containing these will compress poorly and will have a large number of JPEG artifacts. If the image also has very few colors, it would have been better off as a gif.

JPEG is one of the three accepted formats for world wide web images. (Other formats work too, but these are the most well supported.)

Log in or registerto write something here or to contact authors.