The first misconception of the JPEG is that it is a type of file — it’s not. JPEG is a technique for image compression. The acronym stands for Joint Photographic Experts Group, the professional group that developed the JPEG standard.
In 1986, this committee formed to develop a standard for compressing image files. Note that this predates common web practices like blogging, email and company websites — all of which benefit from smaller image files — but the original intention was to help out pros and amateurs in photography, who needed to store large files.
The file format for a JPEG is either Exif (Exchangeable image file format) or JFIF (JPEG File Interchange Format), but it’s not common to distinguish between them — they’re just known as JPEG.
In the early days of the Internet, the common file format to use was the GIF, but like PNG, this format limits the number of colors (called “indexed”), so soon the JPEG won people over.
JPEG works by organizing an image into 8×8 pixel blocks and simplifying the data in the block. Depending on the composition of the photo, this can cut down on image quality (but usually is not visible to the human eye). There is a scale, so you are able to decide how much quality you want to lose in order to shrink the file size, and 60% is said to be a happy medium.
Because of how the JPEG process compresses files, it is often used with photos but not images with text or solid lines. Take a look at the images below — the image on the left is a PNG while the one on the right is a JPEG.
Here’s a close up of the PNG:
You can see that along a solid line, the compression took the average of an area in order to make the file smaller, but in the process, lost some quality, causing the blurriness on the corner.
Every time you open a JPEG file, edit and save it, you lose quality because of something called lossy compression. This means the program you use is able to minimize the data it has to handle for your file, and it’s not noticeable at first but over time could damage the image in a visible way.
There is no difference between file that ends with .jpg and .jpeg. Operating systems such as Mac OS or Windows may prefer one over the other (Mac still seems to stick with three-letter extensions), but will recognize a file no matter which extension it uses.
Image courtesty of Flickr, hpj7173
Read more: http://mashable.com/2012/09/28/jpeg/