The quality of an image is dependent upon the file format used to store image data.
For JPEG/
JFIF files, the data compression
ratio is another factor influencing image quality.
In this first example a graphic
depicting some swirls and twirls and smooth colour gradients is displayed in graphic's
file types JPEG/
JFIF,
PNG, and
GIF. Notice the considerable estrangement
effect the image experiences when displayed as an indexed, i.e. with only 256 colours,
PNG or GIF file. JPEG/JFIF files show noticeable loss of quality only from around
40% compression ratio downwards.
The file size of 139kB of the original image is reduced to 58.628kb, about 41.9%
of the original, when choosing 24bit PNG or to 4.653kB, about 3.3% of the original
when applying 60% compression choosing JPEG/JFIF.
You see, in this example the JPEG/JFIF file format is certainly
the best choice with respect to file size and image quality for serving this kind of image.