Understanding basic image file formats
What's the difference between a JPEG, PNG, and TIFF? Which file format should you use and when?
Chances are good that you’ve witnessed a wide variety of file formats flit across your screen, but do you really understand what they mean? For example, you may understand that a JPEG is for pictures but what’s a PNG and a TIFF? And which format supports an image with a see-through background? In this column, you’ll get answers to those questions and more.
JPEG stands for the Joint Photographic Experts Group that developed it. It supports a wide range of colors, so it’s the one most folks capture on their cameras and scanners (JPEG works well for black-and-white photos, too). However, JPEGs are also compressed, so some detail gets sacrificed to produce a smaller file size, which is great for maximizing space on your camera’s memory card, posting online, or for sharing via email.
In fact, a JPEG saved at the highest quality from your scanner is indistinguishable from a TIFF. It’s also practically impossible to spot quality loss on a second generation JPEG—say, you edit the original JPEG (1st gen) your camera or scanner captured and then save it as a JPEG (2nd gen) at the highest quality—which is why it’s the preferred format for uploading to online printing services and stock photography agencies. However, if you open JPEG (2nd gen), edit it and then save it as a JPEG (3rd gen), you’re well on your way to creating pixel pudding.
To avoid this in apps such as Adobe Photoshop, the Photoshop Elements Editor, Affinity Photo, or Pixelmator, save JPEG (1) in the app’s native file format (say, PSD) to preserve quality. To re-edit the file, open the PSD, make your changes and then save a JPEG from the native file. You don’t have to worry this in apps such as Apple Photos, Adobe Photoshop Lightroom, and Alien Skin Exposure X. In these database-driven apps, you’re always working with the original—your edits are stored in a database and applied when you export the image, which generates a new copy.
TIFF stands for tagged image file format and it’s long been the gold standard for printing high-quality images. Nearly any app can work with it, and it can support layers created in Photoshop. The quality of a TIFF is always as pristine as the original, though file sizes can be huge. Designers used to rely on TIFFs exclusively, though these days pro-level page layout apps can use native Photoshop files, which have all the quality of a TIFF at a smaller file size. If you’re sending an image to someone else for inclusion in a printed book, brochure or magazine, you could send a high quality JPEG; however, to be super safe, send an uncompressed TIFF.
PNG stands for Portable Network Graphics. It supports a wide range of colors and transparent backgrounds, which is handy for plopping a graphic atop another background. This format uses lossless compression, so you don’t lose any image detail. As a result, it produces higher-quality images than JPEG format, but the file sizes are bigger.
PNGs come in two flavors: PNG-8 and PNG-24. The latter supports more colors and partially transparent pixels, which is crucial if you’ve added a drop shadow to an image with a transparent background or when the image you want to post online includes a large gradient (a smooth transition from one color to another, like a big sky). Unlike JPEG, the PNG format keeps text and logos crisp when posting online, which is handy for social media cover images. Other uses include high quality graphics for a slide deck (think Keynote or PowerPoint) or for posting a highly detailed image to your online photography portfolio. Legend also has it that Facebook’s compression algorithm doesn’t destroy PNGs as much as JPEGs.
GIF stands for Graphics Interchange Format. It produces a small file size that’s perfect for web graphics that have a limited number of colors (think cartoon art), a transparent background, or are animated (this column has more on animated GIFs). Thanks to high-speed Internet, this file format isn’t as popular as it used to be for static graphics (PNG is higher quality), but it’s still widely used for animated graphics on the web or in a slide deck.
PSD is the native format of Adobe Photoshop and Photoshop Elements, though several image editing apps support this format, too. This format supports layers, enabling you to have image adjustments, graphic elements, and text on separate layers that are stored inside a single document. Saving your file in PSD format keeps your layers intact, so you protect your original image and you can continue editing the document later on. (Apple Photos can import layered Photoshop files, too.)
PDF is short for portable document format and is hugely popular for sharing single- and multi-page documents to view or print. Saving a file in this format is like taking a picture of the file: All the fonts, images, and videos it contains are included, so it looks just like the original, but you don’t have to own the software that created it. This format can be opened and printed by most every computer on the planet.
PDF files can be compressed, but they don’t have to be; it all depends on the options you pick when saving the file. For this reason, it’s often preferred by printing companies for stuff like invitations, business cards, postcards and brochures. You can generate a high-quality PDF from anything your Mac can print: choose File > Print, and in the resulting dialog box, click PDF at lower left and choose Save as PDF.
BMP is a popular graphics file format used on Windows-based PCs. If you use a PC at work, or if you’ve got friends who do, you may encounter this format.
While there are many more formats, these are the most common. Check back next week for coverage on photography-related formats such as raw and DNG. Until next time, may the creative force be with you all!