PNG is one of the few widely used formats that exists for a purely legal reason. It was designed, in a matter of weeks, by people who had just been told that the format they were using might cost them money. The story explains several things about PNG's design that otherwise look arbitrary — and it ends with the better format failing to displace the one it was built to replace.
What happened
GIF used a compression algorithm called LZW. Unisys held a patent on it. In December 1994 Unisys announced it would enforce that patent and charge developers of GIF-writing software. Within days, a group of developers on a mailing list began designing a replacement that used no patented technology. The first PNG specification was finished in about three months.
Where GIF came from
CompuServe released GIF in 1987 as a way to share images across the wildly different computers of the era — machines that had nothing in common in terms of display hardware. GIF's 256-colour palette was a limitation and also the point: it kept files small enough for modem transfer and displayable on almost anything.
For compression it used LZW, published by Terry Welch in 1984 as an improvement on the Lempel-Ziv algorithms. It was fast, effective on the flat-colour graphics of the day, and widely published in the technical literature.
What CompuServe appears not to have known is that Unisys, Welch's employer, had filed a patent on it.
⚠️ The gap that made this possible
LZW was published in a journal and freely discussed for years before anyone raised the patent. Implementers read the paper, implemented the algorithm, and had no reason to check a patent database — the practice of doing so was not established, and a granted patent on a published algorithm was not what most developers expected in the 1980s.
GIF spread to essentially every graphics program in existence before the licensing question was ever asked.
December 1994
Unisys and CompuServe jointly announced that developers of software producing GIF files would need a licence from Unisys.
The reaction was disproportionate to the actual terms, and understandably so. The immediate demand was directed at commercial software vendors rather than at individuals with GIFs on a home page, but the announcement was ambiguous enough that nobody knew where the line was. Would shareware authors owe fees? Would a website using GIFs? Would a free image library have to stop distributing?
The uncertainty was the damage. A "Burn All GIFs" campaign appeared. Free software projects had a genuine problem: they could not pay per-copy royalties on software given away, so they faced removing GIF support entirely.
The broader alarm was structural. The web was two years old and being built on the assumption that its formats were free to implement. A patent claim on one of its two image formats suggested the assumption was unsafe — and that a format everyone had adopted could be monetised retroactively, years after it became a standard.
Designing PNG
Discussion started on a mailing list within days of the announcement. What followed is one of the better examples of standards work under time pressure.
| Date | Event |
|---|---|
| 28 December 1994 | Unisys licensing announcement |
| 4 January 1995 | First design proposal circulated |
| January 1995 | Named PNG — "PNG's Not GIF" |
| March 1995 | Specification draft 9, essentially the final design |
| October 1996 | W3C Recommendation |
Three months from problem to complete specification, produced by volunteers coordinating by email. The design constraints were unusually clear, which helped enormously:
- No patented technology. Non-negotiable — it was the entire reason for the project.
- Better than GIF at everything except animation. A replacement had to be worth adopting on merit too.
- Streamable. Progressive display over slow modems.
- Robust. Detect corruption, and detect the specific corruption caused by transferring binary files in text mode — a very common error at the time.
- Extensible. Decoders must skip data they do not understand rather than failing.
What they chose instead of LZW
DEFLATE — the algorithm from ZIP, published openly by Phil Katz and free of patent claims. It was already widely implemented, well understood, and compressed better than LZW on most content.
PNG added a step LZW-based GIF does not have: prediction filters. Before compression, each row of pixels is replaced by the difference between each pixel and a prediction based on its neighbours. A smooth gradient becomes a long run of identical small numbers, which DEFLATE compresses far better than the original values. The encoder tries every filter on every row and keeps the best.
This is why PNG typically beats GIF by 10–30% on the same image while also supporting vastly more colours.
The features GIF could not offer
| Feature | GIF | PNG |
|---|---|---|
| Colours | 256, palette only | Up to 16.7 million, or 48-bit |
| Transparency | One colour, fully on or off | Full 8-bit alpha channel |
| Compression | LZW | DEFLATE with prediction filters |
| Interlacing | Row-based, 4 passes | Two-dimensional, 7 passes |
| Integrity check | None | CRC-32 on every chunk |
| Gamma and colour | None | Gamma, chromaticity, ICC profiles |
| Animation | Yes | No |
The alpha channel was the significant advance. GIF transparency is binary — a pixel is either fully visible or fully invisible — which is why GIF logos on a coloured background have hard, jagged edges. PNG's per-pixel alpha allows genuinely smooth edges and soft shadows over any background.
✅ The PNG signature is a deliberate trap
Every PNG begins with these eight bytes: 89 50 4E 47 0D 0A 1A 0A. Each one has a job.
89— high bit set, so software that strips the eighth bit corrupts it detectably.50 4E 47— the lettersPNG, readable in a text dump.0D 0A— a CRLF pair. If a transfer converts line endings, this changes and the file is known to be damaged.1A— DOS end-of-file, soTYPE file.pngstops rather than filling the screen with binary.0A— a bare LF, catching the opposite line-ending conversion.
Eight bytes that detect the two most common ways of corrupting a binary file in 1995. It is a small piece of unusually thoughtful engineering.
What happened next
The patents expired: in the United States in June 2003, and in Europe and Japan through 2004. GIF became entirely free to use, and the crisis that produced PNG ended.
PNG had by then been adopted for still images and largely displaced GIF there. But GIF did not disappear, for a reason PNG's designers had explicitly accepted: PNG has no animation.
That was a deliberate choice — the view was that animation belonged in a separate format, and a companion called MNG was developed for it. MNG was complex, arrived late, and was never widely implemented. It is effectively dead.
APNG — animated PNG — was proposed by Mozilla developers in 2004 as a much simpler alternative, designed so that a decoder without APNG support still shows the first frame correctly. The PNG group rejected it as an official extension, browsers implemented it anyway, and it now has universal support. The formal standards process and the actual outcome diverged completely.
💡 Why GIF outlived the format built to replace it
By the time animation was solved, GIF had acquired a second life as a cultural format. The word had stopped meaning a file type and started meaning a short looping clip — and platforms that serve "GIFs" today overwhelmingly serve MP4 or WebM behind the scenes, precisely because actual GIF is so inefficient.
The format lost on technical merit and won on inertia and vocabulary. That is a more common outcome than engineers expect.
While we are here: the committee names
Several image and video formats are named after the groups that wrote them, which is why the acronyms are so unhelpful:
| Name | Stands for |
|---|---|
| JPEG | Joint Photographic Experts Group |
| MPEG | Moving Picture Experts Group |
| PNG | Portable Network Graphics, or "PNG's Not GIF" |
| GIF | Graphics Interchange Format |
| TIFF | Tagged Image File Format |
| WebP | Web Picture — Google, 2010 |
| AVIF | AV1 Image File Format |
"Joint" in JPEG refers to a collaboration between two standards bodies, ISO and the ITU. The format is named after the committee rather than the technique — which is why the name tells you nothing about what it does, and why it is pronounced as a word rather than spelled out.
The pattern this fits
The GIF episode is the clearest case of a recurring dynamic: a format becomes a de facto standard, someone attempts to extract value from that position, and the ecosystem routes around them.
The same shape appears repeatedly. H.265 is technically excellent and encumbered by patent pools charging per device — so an industry alliance built AV1, royalty-free, and browsers shipped that instead. MP3 licensing drove adoption of Vorbis and later Opus. Proprietary document formats drove ODF and then Office's own XML formats.
In every case the response was the same: given a format everyone depends on and a rights holder who wants payment, the ecosystem funds a replacement rather than the licence. It is usually cheaper, and it removes the problem permanently rather than renting a solution.
PNG is thirty years old, entirely free, in every browser and every operating system, and exists because someone tried to charge for the alternative.
Converting between image formats?
Convert PNG, JPG and WebP in your browser — no upload, no account, no licence fee.
Open the PNG to JPG Converter →Summary
- PNG exists because Unisys decided to enforce the LZW patent in December 1994.
- The specification was designed in about three months by volunteers on a mailing list.
- It uses DEFLATE plus prediction filters — patent-free and better compressing than LZW.
- The eight-byte signature detects text-mode transfer corruption, a genuine problem in 1995.
- The patents expired in 2003–2004. GIF has been free ever since.
- PNG deliberately omitted animation, which is why GIF survived.
- APNG was rejected by the standards group and shipped anyway.
- The pattern repeats — patent pressure on a standard reliably produces a free replacement.
Frequently Asked Questions
Why was PNG created?
Because in December 1994 Unisys announced it would enforce its patent on LZW, the compression algorithm inside GIF, and require licence fees from developers of software that wrote GIF files. Within days a group of developers began designing a patent-free replacement, and PNG's first specification was complete in about three months.
What does PNG stand for?
Officially Portable Network Graphics. Unofficially it is a recursive acronym for 'PNG's Not GIF', which was the working name during development and reflects exactly why it was created.
Is GIF still patented?
No. The LZW patents expired between 2003 and 2004 in the US, Europe and Japan, and GIF has been entirely free to use since. By then PNG was well established, but GIF survived because it had something PNG lacked at the time: animation.
Is PNG better than GIF?
For still images, substantially. PNG supports millions of colours against GIF's 256, has a full alpha channel rather than one fully transparent colour, and typically compresses better. GIF's only remaining advantage was animation, which APNG and WebP have since matched.
Should I still use GIF for animations?
Generally no. An animated GIF is limited to 256 colours and is very inefficient — a short clip can be several megabytes where the same content as MP4 or WebP is a tenth of the size. Use video for anything longer than a moment, and animated WebP or AVIF where a looping image is genuinely wanted.