JPEG (Joint Photographic Experts Group) is a raster image format used mostly for storage and publishing of photographic images because of its excellent compression techniques. Because of the high level of compression, this format is not ideal for line-art, text, or drawings with sharp borders and distinct color transitions since images may become fuzzy (lossy compression). Most photo-realistic images you see on the Web are JPEG images.
Frequently Asked Questions
Lossy and lossless are terms that describe whether or not an image can be recovered perfectly when it is uncompressed.
With lossless compression (think “Loss -less”), all data that was originally in the file is completely restored when uncompressed. GIF and PNG are Web image formats that provide lossless compression.
On the other hand, lossy compression (Lose) reduces a file by permanently eliminating some information which is imperceptible to the viewer. When the file is uncompressed, only a part of the original information is still there although this may not be noticeable. Lossy compression is generally used for video and sound, where a certain amount of information loss will not be detected by most users. The JPEG image file, commonly used for photographs and other realistic or high-definition images on the Web, is an image that has lossy compression. Using JPEG compression, the creator can decide how much loss to introduce and make a trade-off between file size and image quality. The larger the file size, the higher the quality.
- The image formats used on web sites are JPEG (or JPG), PNG and GIF. JPEG is best for images with many colors such as photos. GIF is best for line art, illustrations and drawings with limited color. PNG is the most versatile and can be used quite broadly on web-sites.
- The image formats used in documents follow a similar rule. GIF, TIFF and PNG are best for images with fewer colors and JPEG is used for images with many colors such as photos. The best test is to use pdf2image to convert to a few different formats and then view them both on-screen and in print to see which gives you the desired result.
- It’s also important to determine what formats your application can import. If the program you want to use only accepts BMP, then you need to convert to this format, even if it produces larger files than PNG.