===== File Format ===== ==== File Formats for Digital Images ==== File Formats are a standard means for saving digital images. There are a variety of common file formats and perhaps a hundred less common file formats. The primary difference between many formats is how an image is compressed. Compressing images is a method used to make the file smaller and speed up transmission of the file. Compressed images are the standard for web pages as users do not want to wait a long time simply to view an uncompressed image. There are two types of compression used in digital image file formats: lossy compression and lossless compression. **Lossless Compression** reduces the file size but preserves detail within the image. The file will tend to be larger than a lossy version of the same file. **Lossy Compression** reduces the file size by discarding or averaging visual information. When high quality settings are used, the file will be larger but quality is generally maintained. When low quality settings are used, the file is much smaller but there is usually visible degradation of image quality.\\ \\ {{ :lossy-vs-losslee.jpg?&600 |}} \\ //Click to enlarge the image above for a comparison. In particular, examine the eyelashes and the skin of the eyelids.// \\ \\ \\ ==== Common Image File Formats ==== **JPG** (or JPEG) is a lossy compression file format. JPG is one of the most widely used compressed file formats due to its prevalence on websites and with consumer digital cameras. When saving with high quality settings, the JPG format is virtually indistinguishable from lossless compression formats. **GIF** is technically a lossless compression file format but is restricted to 256 colors. For a photograph, 256 colors is usually insufficient to create good image quality. As a result of the color limitation, it is most commonly used for graphic elements that utilize a reduced color palette such as buttons, diagrams, and logos. GIF files can include small sequences of images in a single file, allowing for the display of video or animation. **PNG** is a lossy compression file format that is generally regarded as the successor to JPG. It usually saves higher quality images with smaller file sizes than JPG. **TIF** (or TIFF) is a lossless compression file format. TIF is the most common lossless compression file format, though it has an option for lossy compression as well. TIF files, when saved using lossless compression, will be larger in size than lossy compression methods but will usually have higher quality since there is no image degradation in lossless compression. **PSD** (or Photoshop) is the file format specific to Adobe Photoshop. PSD files are not compressed in any fashion and are thus quite large when compared to other file formats. However, PSD files maintain Adobe Photoshop-specific information, such as layers and layer masks, that users typically want to keep in intact. A common practice is to keep a large PSD file for editing but use a compressed file (JPG, PNG, or TIF) for printing and web distribution. **PDF** (Portable Document Format) is a format designed to save and present entire documents. PDF can be saved as lossy or lossless. PDF files can contain multiple pages, text, images, and even 3D models. The format is ideal for page layouts, presentations, and any multi-page document but it is also ideal for text because the text remains editable (the text is not an "image" of text, as it would be in a JPG/GIF/PNG/TIF file).