What is JPG?
JPG is a file extension for a lossy graphics file. The JPEG file extension is used interchangeably with JPG. JPEG stands for Joint Photographic Experts Group who created the standard. JPG files have 2 sub-formats, JPG/Exif (often used in digital cameras and photographic equipment).
The JPEG standard specifies the codec, which defines how an image is compressed into a stream of bytes and decompressed back into an image, but not the file format used to contain that stream. The Exif and JFIF standards define the commonly used formats for interchange of JPEG-compressed images.
A JPG file consists of a sequence of segments, each beginning with a marker, each of which begins with a 0xFF byte followed by a byte indicating what kind of marker it is. Some markers consist of just those two bytes; others are followed by two bytes indicating the length of marker-specific payload data that follows.
If you are a photographer and consider yourself a good one, set your camera to RAW and never change it back from it.
When you take a picture, the camera collects a bunch of data from the sensor, thi is considered raw data. Every single one of the individual pixels inside your camera will store it’s data.
Shooting in RAW with a 21Mega Pixel Camera means that 21 Million individual light meters on your imaging chip have made a measurement.
What happens next, depends on your camera settings, if you have your camera set to JPG it will write all this information to a single 8 bit jpg file. The problem with that is the decisions your camera has to make to do this.
Sharpness, color saturation and white balance are calculated and written to the file, but when this happens, you are in effect losing a lot of information. If your camera gets it right, that’s not a problem, what what if you later decide that you wanted to use less sharpness , a different color saturation or a different white balance?
Suddenly you are out of luck, the data that was originally available has been discarded and all you are left with is the data that was written to your .JPG file.
In contrast a RAW file usually has a lot more color information (12 or 14 Bit) and contains all the information the camera originally recorded, this means that you have a lot more data to work with from that capture.