2. Digital Image File Types Explained
JPG, GIF, TIFF, PNG, BMP
What are they, and how do you choose?
These and many other file types are used to encode digital images. Part of the
reason for the many different types of file types is the need for compression.
Image files can be quite large, and larger file types mean more disk usage and
slower downloads. Compression is a term used to describe ways of cutting the
size of the file. Compression schemes can by lossy or lossless.
Another reason for the many file types is that images differ in the number of
colors they contain. If an image has few colors, a file type can be designed to
exploit this as a way of reducing file size.
3. Lossy vs. Lossless compression
You will often hear the terms "lossy" and "lossless" compression.
A lossless compression algorithm discards no information. It looks for more
efficient ways to represent an image, while making no compromises in accuracy.
In contrast, lossy algorithms accept some degradation in the image in order to
achieve smaller file size.
A lossless algorithm might, for example, look for a recurring pattern in the file,
and replace each occurrence with a short abbreviation, thereby cutting the file
size. In contrast, a lossy algorithm might store color information at a lower
resolution than the image itself, which can result in chunky square artifacts and
other undesirable effects.
4. Number of colors
Images start with differing numbers of colors in them.
The simplest images may contain only two colors, such as black and white, and
will need only 1 bit to represent each pixel.
Early PC video cards would support only 16 fixed colors. Later cards would
display 256 simultaneously, any of which could be chosen from a pool of 224,
or 16 million colors.
Currently video cards devote 24 bits to each pixel, and are therefore capable of
displaying 224, or 16 million colors without restriction. A few (Apple Retina) can
display even more.
Since the human eye has trouble distinguishing between similar colors, 24 bit or
16 million colors is called TrueColor.
5. Print vs Web Graphics
The first and most basic way to sort out file formats is to understand their
intended use – Graphic designers work in both PRINT and WEB environments.
Best practice for graphic designers is to work in the highest resolution and least
compressed formats for creating artwork and then export to the best format for
the projects.
6. RAW
is a completely unprocessed/compressed image output option available on some
digital cameras and high resolution scanners.
Though lossless, it can be smaller than TIFF files of the same image.
The disadvantage is that manufactures have proprietary formats meaning there is
no one universal RAW file type, and so you may have to use the manufacturer's
software to view the images.
Some graphics applications like Lightroom and Photoshop can read some
manufacturer's RAW formats with the correct plugins.
7. PSD
The Photoshop Document (.PSD) is a proprietary format used by Photoshop.
Photoshop's files have the PSD extension.
PSD is the preferred working formats as you edit images, because the PSD format
retains all the editing power of the program – Layers, adjustment layers, effects,
masks, blending modes and channels.
Photoshop uses layers to build complex images, and layer information is lost in
every format except TIFF.
PSD’s can be extremely large and by best practice should not be placed directly in
another program like Illustrator or InDesign EVEN though it is possible to do so.
8. PDF
The Portable Document Format (.PDF) is a file format used to present documents in a manner
independent of application software, hardware, and operating systems.
Each PDF file encapsulates a complete description of a fixed-layout flat document, including the
text, fonts, graphics, and other information needed to display it.
PDFs will save enough of the font information used in the document to print EVEN IF THE FONT IS
NOT AVAILABLE ON THE SYSTEM PRINTING IT.
PDFs exported from Photoshop and Illustrator keep information for placed images layers,
adjustment layers, effects, masks, blending modes and channels but can be opened in Acrobat
reader or older versions of the software.
This means PDFs can be very large, the save window dialog allows you to choose how much and if
your PDF is compressed. PDF is the default format for dealing with commercial printers and digital
print shops.
9. TIFF
Tagged Image File Format (.TIFF or .TIF) is a computer file format for storing raster
graphics images, popular among graphic artists, the publishing industry, and
photographers.
The TIFF format is widely supported by image-manipulation applications, by
publishing and page layout applications, and by scanning, faxing, word
processing, optical character recognition and other applications.
TIF is basically lossless, the files can be compressed with algorithms which are
included as part of the file.
TIFF uses a lossless compression algorithm called LZW.
In practice, TIFF is used almost exclusively as a lossless image storage format with
no compression.
10. TIFF
TIFF is a flexible, adaptable file format for handling images and data within a
single file, by including the header tags (size, definition, image-data arrangement,
applied image compression) defining the image's geometry.
A TIFF file, for example, can be a container holding JPEG (lossy) and PackBits
(lossless) compressed images.
A TIFF file also can include a vector-based clipping path (outlines, cropping, image
frames).
11. TIFF
The ability to store image data in a lossless format makes a TIFF file a useful image
archive, because, unlike standard JPEG files, a TIFF file using lossless compression
(or none) may be edited and re-saved without losing image quality.
This is not the case when using the TIFF as a container holding compressed JPEG.
Other TIFF options are layers and pages.
TIFF files can be saved as RGB or CMYK making it the preferred format for working
with high resolution print projects.
12. TIFF
TIFF This is usually the best quality output from a digital camera.
Digital cameras frequently offer two or three JPG quality settings plus TIFF. Since
JPG always means at least some loss of quality, TIFF means better quality but the
file size is huge compared to the best JPG setting, and the advantages may not be
noticeable depending on the image type.
Do NOT use TIFF for web images, web browsers will not display TIFFs.
13. PNG
Portable Network Graphics (.PNG) is a raster graphics file format that supports
lossless data compression.
PNG was created as an improved, non-patented replacement for Graphics
Interchange Format (GIF), and is the most used lossless image compression format
on the Internet.
In contrast with the TIFF LZW compression, it looks for patterns in the image that
it can use to compress file size. The compression is exactly reversible, so the image
is recovered exactly.
14. PNG
PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA
colors), grayscale images (with or without alpha channel), and full-color non-
palette-based RGB[A] images (with or without alpha channel).
PNG was designed for transferring images on the Internet, not for professional-
quality print graphics, and therefore does not support non-RGB color spaces such
as CMYK.
PNG supports partial transparency. Partial transparency can be used for many
useful purposes, such as fades and antialiasing of text.
PNG transparency is still not completely supported in all web browsers.
15. PNG
PNG is by far the best possible solution for web graphics because it can compress
Photographs AND graphic equally well.
PNG has the option to save as 8 bit (256 color) or 16 bit (millions of color) which
includes a transparency channel.
PNG is superior to GIF. It produces smaller files and allows more colors.
16. GIF
Graphics Interchange Format (.GIF) achieves compression in two ways.
First, it reduces the number of colors of color-rich images, thereby reducing the
number of bits needed per pixel.
Second, it replaces commonly occurring patterns (especially large areas of uniform
color) with a short abbreviation: instead of storing "white, white, white, white,
white," it stores "5 white.”
GIF is "lossless" only for images with 256 colors or less.
For a single color image, GIF may "lose" 99.998% of the pixels – creating very small
files.
17. GIF
GIFs are suitable for sharp-edged line art (such as logos) with a limited number of
colors. This takes advantage of the format's lossless compression, which favors flat
areas of uniform color with well-defined edges.
Do NOT use GIF for photographic images or graphic images that use gradients.
GIV supports transparency.
GIF format support multiple frames and can be used to create animations for the
web.
18. JPG
Joint Photographic Experts Group (.JPG) is one of the oldest formats optimized for
photographs and similar continuous tone images that contain many colors.
The degree of compression can be adjusted, allowing a selectable tradeoff
between storage size and image quality.
JPEG typically achieves 10:1 compression with little perceptible loss in image
quality. JPG works by analyzing images and discarding information that the eye is
least likely to notice.
19. JPG
At moderate compression levels of photographic images, it is very difficult for the eye
to discern any difference from the original, even at extreme magnification.
Compression factors of more than 20 are often quite acceptable.
Graphics programs like Photoshop, allow you to view the image quality and file size as
a function of compression level, so that you can conveniently
JPG is the format of choice for nearly all photographs on the web.
JPG is the most used format for digital photographs.
Most digital cameras save in a JPG format by default. Switching to TIFF or RAW
improves quality in principle, but the difference can be difficult to see. Choose the
balance between quality and file size.
20. JPG
Never use JPG for line art or solid color graphics.
On images such as these with areas of uniform color with sharp edges, JPG does a
poor job. These are tasks for which GIF and PNG are best suited.
JPEG is also not well suited to files that will undergo multiple edits, as some image
quality will usually be lost each time the image is decompressed and
recompressed, particularly if the image is cropped or shifted, or if encoding
parameters are changed – see digital generation loss.
To avoid this, an image that is being modified or may be modified in the future
can be saved in a lossless format, with a copy exported as JPEG for distribution.
21. BMP
is an uncompressed proprietary format invented by Microsoft.
There is really no reason to ever use this format.