There are many different raster image file types to choose from for your projects, but which is the right one for your needs?
First, we’ll explain what exactly a raster image is. A raster graphics image is a dot matrix data structure, usually in the shape of a square or rectangle. This means that a raster image is made up of a series of tiny square dots called pixels. Raster images can be printed or viewed on the screen, the pixel density must be adjusted accordingly in production. The following photo has an enlarged section showing pixels.
Pixel density is exactly what it sounds like; it is how densely populated the pixels (or dots) are in an image. This is measured in PPI (Pixels Per Inch) or DPI (Dots Per Inch). These are used to determine the sharpness or clarity of the piece. On screen pixel density sits at a standard of 72 PPI and looks sharp and clear because you sit back away from a screen a bit (though modern screens and internet speeds can handle much larger workloads). When printing, the PPI must be set much higher. 300 PPI is the standard here, this helps images look crisp and in focus even at inches. If you are ever unsure about the correct pixel density of a project, remember that you can always scale the image down from a higher concentration of dots, but never can you “enhance” a lower PPI to a higher PPI (sorry CSI fans).
JPEG (JPG) – Joint Photographic Experts Group
Jpegs are the most common image type found on the web today. Jpegs typically store 24 bits per pixel, allowing over 16 million possible colors, which is more than enough for most uses. JPEG uses lossy compression meaning it is an irreversible form of compression that uses inexact approximations, and data dumping to show content. These techniques are used to reduce file size to make easier on storage and transmission. The approximation and data dumping comes at a cost, however. Depending on the amount of compression applied to the image, the image will lose quality. Sometimes this process leads to noticeable distortions in the images called artifacts. Artifacts especially occur if the file has been saved as a jpeg multiple times, as it uses lossy compression every time it saves. These can be avoided by applying the compression at the correct rate for your use. Typically, JPEGs should be reserved for full color photos used on screen.
TIFF (TIF) – Tagged Image File Format
TIFF is the standard for most high-quality print photo needs. Tiff files can either be uncompressed or can utilize lossless ZIP or LZW compression, so the quality of the image will not be effected by the compression. Regardless, the file size will turn out larger than a JPEG because there is more data involved. TIFFs are widely regarded as the file type of choice for working image files for photographers and designers because you can save the same file multiple times and not lose quality like a JPEG would with lossy compression. They are an excellent choice for high quality prints, and working files. TIFFs should be avoided when it comes to online use due to their large file size.
GIF – Graphics Interchange Format
GIFs are often used for web graphics. It may contain up to 256 indexed colors with a color palette that may be a predefined set of colors or may be adapted to the colors in the image. GIF files are saved in a lossless format, meaning the clarity of the image is not compromised with GIF compression. That being said, GIFs should only be used for simple graphics such as logos and minimal colored photos with sharp edges and no gradients. The biggest benefit to GIFs small file size is it’s ability to fit several images into one file. The images are then displayed in a particular order, this makes the image look like a short video and is known as an animated GIF. For most tasks the GIF file format was originally designed for, the PNG is the better option.
PNG – Portable Network Graphics
PNGs utilize Lossless compression, meaning they allow the original data to be perfectly restructured from the compressed form. PNGs can be either 8 bit (256 colors), 24 bit (over 16 million colors), or 32 bit (over 16 million colors and an alpha transparency.) PNGs excel at displaying crisp lines and clean graphics, and because they can have a transparent alpha channel, they can display clear backgrounds, shadows, and transparencies. The advantages of this alpha channel can be seen in the image above. PNGs are most often used to display large blocks of color, logos, or other web graphics with sharp contrast and crisp lines.
File types for different purposes
JPEG – Online full color images TIFF – High quality working files and prints GIF – Animated images and online graphics PNG – High quality online graphics, and anything with transparencies