Here is a brief discussion and comparison of seven file formats for photography and graphics. Don’t look for a complete or scholarly treatise. It’s merely my take on what they’re for, where they come from, their future prospects, and particularly how I use them.
TIFF (“Tagged Image File Format”) is the grand-daddy of image file formats, originating in the mid-1980s. Designed from the outset to be flexible and extensible, it has many mutually-incompatible variants for specialized uses ranging from fax machines to desktop publishing. But in its simplest form of a single 24-bit or 48-bit color image without compression, TIFF is probably the most durable, compatible, and widely supported of the current file formats that can store full image data.
With the notable exception of Web browsers, nearly all software that displays or edits images can read TIFF. That compatibility comes at the price of large file size: Each pixel of a color image requires three (or possibly six) bytes. That makes it unattractive for Web use, which is why browsers don’t support it. Some software allows compression, but the resulting files aren’t much smaller and may be unreadable in other programs. The compression option in Photoshop actually increases the size of 48-bit TIFF files!
TIFF can store the metadata that digital cameras and some image editing programs create to record date, time, exposure, color space, owner, copyright, and other information. It also accommodates multiple channels (e.g., “alpha” channels for indicating transparent parts of images and storing selections in image editors, infrared cleaning data from scanners, and the usual red, blue, and green). Photoshop’s implementation can store layers, making TIFF nearly interchangeable with its native PSD format.
I use TIFF for storing full-resolution finished, non-sharpened “master” images. From them I make everything else: the smaller versions for this Web site, prints, and any other products purchasers might want to license. I believe these simple uncompressed TIFF files are very likely to remain supported in future software, which makes them suitable for archival storage of finished images.
JPEG (“jay-peg,” named for the Joint Photographic Experts Group that developed the standard for it in 1992) is ubiquitous on the Web and in digital cameras for full-color 24-bit photographs. Every graphical browser supports it, and nearly all software that displays or edits images can read it. It uses “lossy” compression that attains very compact file sizes by cleverly exploiting the quirks and limitations of human vision. It discards a significant amount of data that the human eye and brain won’t miss. Most software that creates JPEG files can vary the amount of compression to balance quality against file size. Too much compression means smeared color, lost detail, and artifacts. JPEG is limited to 8 bits per channel. It can store metadata, but not alpha channels or layers.
JPEG with low compression (“maximum” or “highest” quality) is a good choice for storing final versions of images that will not require further editing. When viewed or printed, such files are effectively indistinguishable from much larger uncompressed or losslessly-compressed files. But the lossy compression means that repeatedly opening and re-writing a JPEG file degrades the image. It’s rather like the way photocopies of photocopies get increasingly fuzzy. The lost data may also limit and complicate adjustments in an image editor, which can sometimes be a problem with digital camera JPEG files.
Because JPEG is so pervasive, it’s a likely candidate for future-proof archival storage, subject to its inherent limitations. JPEG has been around for over 20 years— practically an eternity in a world where disposability and obsolescence are the very definition of technology. Developers of three newer and “better” file formats (more about them later) have been trying very hard to consign JPEG to the “legacy” ash-heap of history. They have had little success, probably because few users of JPEG are clamoring for its replacement. JPEG may be old and clunky, but it works well enough; and producers of JPEG files can be certain that everyone will be able to view them.
I use JPEG files for the small images on this Web site, and for delivering high-resolution licensed images to purchasers by download or e-mail. Delivery in other formats may require mailing a CD, as the file size could be too large for Internet delivery.
GIF (“Graphics Interchange Format”) is nearly as old as TIFF. Every graphical browser supports it, and nearly all software that displays or edits images can read it. It keeps file sizes small through “lossless” compression— when you uncompress the data you get back exactly what you started with.
GIF is not useful for photographs because it allows a maximum of 256 colors. (Imaging software can simulate a larger color palette by “dithering,” a process that blends tiny dots of the 256 colors to produce additional colors.) GIF is useful for text or drawings, since lossless compression doesn’t create the artifacts and smearing that JPEG often produces in images with sharp, high-contrast edges. GIF supports “transparency,” which means you can designate one of the 256 colors as “invisible” so the background shows through it. That way, lettering, logos, or other images can appear to “float” on the page regardless of the color or background.
I use GIF files (with transparent backgrounds) for the graphical titles at the top of the Travel Photo Essay pages on this Web site. Another common use of GIF is for animated images, since the GIF standard allows multiple images in a single file that Web browsers can display in rapid succession. That feature has made the ancient GIF format newly popular among today’s bloggers, blog commenters, and social media users, as it provides a bandwidth-efficient way to distribute the video counterpart of tweets.
The pronunciation of GIF— whether the g is “hard” as in gift or “soft” as in jiffy— has been a subject of controversy for years. The Oxford English Dictionary, whose American edition proclaimed GIF a 2012 “word of the year,” says either is correct. But when Steve Wilhite, who invented the GIF format, received a “lifetime achievement” Webby Award in May 2013, his five-word acceptance speech (delivered as an animated GIF) was It’s pronounced “JIF” not “GIF”.
PNG (“Portable Network Graphics,” pronounced ping or P-N-G) originated as a “patent-free” replacement for GIF. CompuServe, the pioneering online service, released GIF in 1987. They were apparently unaware that Unisys owned a patent on the “LZW” algorithm chosen for its lossless compression. Unisys slept while GIF became popular, first on Compuserve and other computer bulletin boards and then on the nascent Web. In 1994 they woke up and put their lawyers to work, ordering developers of commercial software that creates GIF files to start paying royalties. Five years later, perhaps out of a desire to squeeze everything they could out of their patent before it expired in 2003, Unisys announced that developers and even individual users of noncommercial and free GIF software now owed them royalties.
PNG was the open-source community’s reaction to the awakened Unisys. It uses a public-domain lossless compression algorithm and provides most of GIF’s features, including transparency. It improves on GIF by supporting full 24-bit color, which makes it suitable for photographs. Because the compression is lossless, file sizes are larger than JPEG. Line art and graphics with 256 or fewer colors, for which GIF is most commonly used, produces file sizes comparable to GIF.
The main reason PNG hasn’t supplanted GIF is that, for many years, Microsoft chose not to support it fully in their Internet Explorer (IE) browser. IE accounted for more than 90% of browser usage in the first five years of this century, and remained the most-used browser through 2011. IE versions 6 and earlier— which some people continue to use despite Microsoft’s efforts to kill IE 6— do not support the “alpha channel transparency” used for color images with transparent backgrounds. IE versions before 9 display incorrect colors in some PNG files. I learned that the hard way when I tried to replace the graphical titles on my Travel Photo Essay pages with new PNG versions. Firefox, Chrome, Safari, Opera, and version 9 and later of IE fully support PNG.
Multiple-frame animation is the only GIF feature not included in the PNG standard. Two competing extensions attempt to fill that gap, but neither has attracted enough interest to be useful. The developers of PNG released the specification for MNG (“Multiple-image Network Graphics”) in 2001. Mozilla (developer of the Firefox browser) released the specification for APNG (“Animated PNG”) in 2004.
Firefox included MNG support until 2003, when Mozilla removed it. Konqueror (used mainly on Unix-based systems) is the only current browser that supports MNG. Plug-ins for MNG are available for Windows browsers. Firefox and Opera include native support for APNG; an add-on is available for Chrome. APNG has the advantage of greater compatibility with browsers that do not support it. Those browsers display the first frame of an APNG file as a still image.
PNG has an inherent flaw that makes it useless for modern digital photography. The PNG standard makes inadequate provisions for metadata. While it does allow a few text fields, there’s no standard way to store the exposure data and camera information (EXIF) that nearly all digital cameras record in their raw and JPEG files. And more significantly, there’s no standard way to embed the color space and profile information that’s essential for a color-managed workflow.
The PNG plug-in Adobe includes with Photoshop extends the format to 48 bits and embeds a color profile, but it doesn’t save even the minimal metadata allowed in the PNG standard. It produces 48-bit files significantly larger than Adobe’s JPEG 2000 plug-in. fnord software offers SuperPNG, a freeware replacement for Adobe’s plug-in. SuperPNG can store and read full EXIF metadata, including color profiles. It also works with 48-bit images. Although I’ve successfully tried earlier versions (and found that they compressed files slightly better than Adobe’s plug-in), the current 64-bit version (dated 7 August 2014) displayed the error message “Can’t write ... due to a program error” when I tried to save files.
JPEG 2000 was supposed to be the Joint Photographic Experts Group’s official successor to their 1992 JPEG standard. Its superior lossy compression technology can produce fewer and less noticeable artifacts with smaller file sizes. It also includes a very effective lossless compression option. Despite its advantages JPEG 2000 has gone nowhere, apart from a few specialized applications outside the photographic or consumer realms. A decade and a half after its release, no Web browser supports it natively. (Browsers can display JPEG 2000 files using plug-ins and extensions, but designers of Web sites can’t count on users having those installed and properly configured.) Part of the problem may be that the “legacy” JPEG format has proved entirely adequate in very extensive use, so nobody is demanding a replacement.
Another difficulty is that image compression algorithms are a minefield of overlapping and broadly-drafted patents, in part due to the understaffed (and some would say inept) United States Patent and Trademark Office. The committee that created JPEG 2000 claims to have obtained all the necessary rights from the owners of the various patents covering its underlying technologies. They’ve made “a strong goal” of allowing anyone to implement the basic functionality without royalties. But even with licenses, those patents effectively preclude the adoption of JPEG 2000 within the influential open-source community. There also remains a pervasive fear that someone might suddenly emerge with an unnoticed and possibly dubious “submarine” patent, and attempt to shake down developers the way Unisys did with GIF and Forgent Networks did with JPEG. Forgent’s patent was eventually invalidated, but not before they extorted over $90 million from 30 companies and sued 31 others.
Photoshop CS2 and CS3 supported JPEG 2000 through a plug-in buried in an “optional plug-ins” directory on the installation CD or DVD. You have to know about it and install it manually. Its lossless mode provides the most space-efficient way to store 48-bit images, including metadata and alpha channels. Reading files is very slow. Writing files is excruciatingly slow, as the plug-in makes multiple passes through the file to optimize lossy compression even if you’ve selected lossless compression. A “fast mode” check-box option disables this optimization and makes file writing somewhat faster, but it often mysteriously un-checks itself and forces you to wait for the useless optimization before you can reset that option.
Adobe seemed to have signed JPEG 2000’s death warrant with the release of Photoshop CS4. No longer included on the installation DVD, the plug-in was relegated to a boneyard collection of “legacy optional plug-ins” available from Adobe’s download site for Windows and Macintosh. But they resurrected JPEG 2000 in CS5, which installs a somewhat improved version of the plug-in as a standard part of Photoshop. This change of direction suggests that at least some of Adobe’s customers are finally becoming interested in the format, though I suspect it’s mainly the ones who buy the Extended version of Photoshop for specialized scientific, technical, and video applications.
Despite the significant space saving, I can’t recommend JPEG 2000 for archival image storage. Few graphics programs can read it; and as far as I know, only Adobe’s plug-in can read the lossless 48-bit files it writes in Photoshop. Despite its apparent revival in CS5 (and also in CS6 and CC), it’s impossible to predict the future of JPEG 2000. Adobe’s Lightroom does not support it, although a third-party plug-in ($34, Windows only) can read JPEG 2000 files. Still, I use JPEG 2000 for saving 48-bit “working” files I create in the process of editing images. It saves significant space when I archive my projects to DVD or Blu-Ray, and Adobe provides no real alternative.
JPEG XR (also known as HD Photo) is Microsoft’s answer to JPEG 2000, and offers very similar features and performance. Microsoft originally called this proprietary format Windows Media Photo. But when they decided they wanted to monopolize digital imaging the way they’ve monopolized office applications, they renamed it HD Photo. Microsoft started promoting HD Photo at the beginning of 2007. They appointed a “Director of Digital Imaging Evangelism” to spread the gospel. Yes, that’s his actual job title!
While Microsoft’s evangelists haven’t yet saved the souls of many users or software developers, they have obtained (or purchased?) the endorsement of four international standards bodies. The Joint Photographic Experts Group has given it the JPEG cachet as as “JPEG XR” (XR stands for “extended range”); the International Organization for Standardization and the International Electrotechnical Commission have jointly designated it as “ISO/IEC 29199-2;” and the International Telecommunications Union has approved it as “ITU Recommendation T.832.”
Microsoft has offered royalty-free licensing of the relevant JPEG XR patents under their Microsoft Community Promise program. Microsoft promises not to sue developers who implement the full open specification. But some members of the open source software community have problems with the legalese wording of the Community Promise, and don’t trust Microsoft to keep their (weasel) word. However, Microsoft’s control of those patents may actually work in JPEG XR’s favor. Their armada of lawyers stand ready to torpedo anyone who threatens a “submarine” attack.
Despite the evangelism and the prestigious international recognition, JPEG XR doesn’t seem have garnered much support outside of Microsoft. Their Expression Studio Web design suite can create the files, and the media viewers included with Vista and later versions of Windows can read them. Versions 9 and later of Internet Explorer also include native support. The only non-Microsoft applications I’m aware of are the freeware viewer/editors IrfanView and Paint.NET, which offer optional plug-ins that can read JPEG XR files.
Microsoft briefly offered a free Photoshop plug-in in 2009. But it quietly and inexplicably disappeared from their download site. A new plug-in appeared in April 2013, this time in 32-bit and 64-bit versions. I found a significant bug in the initial version (dated 8 April 2013). If I saved a file with an alpha channel, Photoshop could read only the parts of the image selected in the alpha channel when I opened the file. Microsoft confirmed the bug and said they would fix it in the next (and still current) version, which they released on 7 June 2013. That version fixed the bug, but it retains the original version’s limitation of saving only one alpha channel (it now displays a warning if an image has more than one).
I’ve found that the Microsoft plug-in’s lossless compression produces files similar in size to the JPEG 2000 plug-in included with Photoshop. But it reads and writes the files significantly faster, which might make it an attractive alternative if you don’t need multiple alpha channels. I can’t say which of these similar formats is more likely to be supported (and thus, readable) over the long term.
Despite Microsoft’s marketing clout, JPEG XR— under any of its various designations— is clearly facing the same uphill battle JPEG 2000 had, to convince users that it offers significant and valuable advantages over established and entirely adequate formats. The evangelists also have the particular challenge of selling it to an inherently skeptical community. Many photographers and graphic designers are loyal Apple Macintosh users, who are inherently resistant to any proprietary Microsoft “solution.” The future of either new JPEG format— or of WebP, Google’s JPEG replacement— may thus come down to whether Apple eventually decides it’s in their interest to embrace one or more of them.
WebP is the newest animal in the file format zoo. Developed by Google specifically for Web use, it’s the third and latest attempt to replace “legacy” JPEG. Its raison d’être is to help companies that store a lot of images on servers (e.g., Google) save space and cost, while also speeding up the loading of Web pages for users. Google claims that WebP produces lossy files 25%-34% smaller comparable-quality JPEG, and lossless files up to 34% smaller than PNG. But Mozilla (Firefox) researchers found that neither WebP nor JPEG XR significantly outperformed JPEG. They concluded that developing an improved JPEG encoder would be better than adopting a new format.
Like JPEG and PNG, WebP is limited to 8 bits per color channel. The current specification includes support for metadata, color profiles, alpha channels, and animation, and provides lossless as well as lossy compression.
It’s difficult to predict whether Google will be any more successful than Microsoft or the JPEG 2000 group at replacing the aging JPEG standard. Google has encouraged developers by releasing the WebP specification and reference code as open source. They may yet persuade Mozilla to support WebP in Firefox. Google added alpha channels to the specification specifically to address Mozilla’s complaint about their absence. But Microsoft seems unlikely to support WebP in Internet Explorer or its successor, Edge. They’re promoting JPEG XR, their own competing solution to the problem WebP is supposed to solve.
Facebook— which has an obvious interest in reducing the size of image files— has experimented with serving WebP images to Chrome users. They unexpectedly received many complaints from users who were suddenly unable to edit, e-mail, or share downloaded images on other platforms. (Facebook’s managers and developers were apparently unaware that anyone did that.) Google responded by creating a plug-in codec for Windows that allows Microsoft Office, and other applications (mostly Microsoft’s) that use the Windows Imaging Component, to read the files.
Other imaging software that supports WebP includes Picasa, Pixelmator, ImageMagick, Konvertor, reaConverter, XnView, and IrfanView. The Australian company Telegraphics offers a free Photoshop plug-in for Windows and Macintosh. I’ve tried it; it works, and its lossless option does seem to produce smaller files than PNG or JPEG 2000. But it was released in 2013, and hasn’t been updated to the current WebP specification. It implements an older version that doesn’t support alpha channels.
DNG (“Digital NeGative,” pronounced ding, or sometimes dingy or dinghy) is Adobe’s open-source universal standard for creating and archiving raw files from digital cameras. DNG is a somewhat controversial topic that merits its own article, which contains an extensive discussion of the format and the problems it’s intended to solve.
Finally, PSD is Adobe Photoshop’s native file format. As you’d expect, it supports everything Photoshop can produce, including layers. To my knowledge, TIFF is the only other format that supports layers, although non-Adobe software may have problems reading files with layers. The main disadvantage of PSD is a file size as extravagant as TIFF, multiplied by any saved layers. The only compression it allows is the nearly worthless “run-length encoding” that compresses some sequences of repeated bytes.
PSD is another possible candidate for future-proof archival storage because of the long-standing thorough dominance of Adobe and Photoshop in the graphics market. Some non-Adobe products like Paint Shop Pro and IrfanView can read PSD, which at least partially allays the concerns of photographers who don’t like Photoshop’s new rental model. I use PSD when I need to preserve layers in working files, although TIFF can do that too.