What is JPEG?
[[File:Felis silvestris silvestris small gradual decrease of quality.png|thumbnail|A [[photograph]] of a [[wildcat]] with amount of compression decreasing from left to right]] In [[computing]], the '''JPEG''' [[file format]] is a file format which is used to [[lossy compression|compress]] [[digital photography|digital images]]. The amount of compression can be changed depending on the wanted quality. If an image is high quality, it will take up a large amount of [[Storage medium|storage]]. If it is low quality, it will take up a small amount of storage. The JPEG file format is commonly found on the [[World Wide Web]]. The word ''JPEG'' is short for the [[Joint Photographic Experts Group]] which created the format. JPEG [[file extension]]s include <code>.jpg</code>, <code>.jpeg</code>, <code>.jpe</code> and others. == How it works == === YP<sub>b</sub>P<sub>r</sub> === The first notable thing about JPEG compression is the way in which the colour of each pixel is stored. Each pixel of the image is assigned 3 [[Byte|bytes]] to define its colour. All three bytes can have any value from 0 to 255 and every possible combination of the three bytes stands for another colour. In most file formats, the RGB format is used for defining the colour. RGB stands for Red Green Blue. It's named this way because the first of the three bytes tells you how much red there is in the pixel's colour. The second byte tells you how much green there is in the colour and the third byte how much blue. The higher value the first byte has, the more red the pixel looks. JPEG also uses three bytes for every pixel each, but it's using the YP<sub>b</sub>P<sub>r</sub> (also known as YC<sub>b</sub>C<sub>r</sub>) format. Here, the first byte tells us how bright the pixel is. The second byte tells us how blue the pixel is. The third byte tells us how red the pixel is. Using this colour format, the brightness is stored apart from the colour. This is useful, because we are going to compress an image. Because the human eye is better at seeing brightness