A modern reaction GIF still begins with six characters written for a dial-up service in the 1980s: GIF87a or GIF89a. Behind that header sits LZW compression, a palette containing no more than 256 colours, and a block structure that current browsers can read much as CompuServe originally described it.
The first public Graphics Interchange Format specification is dated June 15, 1987. It defines GIF as a mechanism for storing and transmitting raster graphics, not as a tool for reaction clips, memes, or looping fragments of television.
Steve Wilhite developed the format while working as a software engineer at CompuServe. The online service needed one image format that could move between computers made by companies such as IBM, Apple, Commodore, and Atari without requiring a separate version for every machine.
Speed mattered just as much as compatibility. According to a history based on interviews with Wilhite’s colleagues, a 2,400-bit-per-second modem was considered fast when the format was being designed, and every unnecessary byte prolonged the wait at the other end of the telephone line.
A format built for slow lines
GIF stores each pixel as an index pointing to a colour in a table rather than recording a complete red, green, and blue value for every position. The index can be eight bits long, allowing a single image to select up to 256 colours from a palette created specifically for that image.
That limit saved space, but it also shaped what GIF handled well. Logos, charts, diagrams, interface elements, and illustrations with flat areas of colour could often be represented efficiently, while photographs with thousands of subtle shades tended to produce banding or visible dithering.
A 320-by-200 image contains 64,000 pixels. Even before accounting for transmission overhead, sending one uncompressed byte for every pixel through a 2,400-bit-per-second connection would take more than three and a half minutes.
GIF reduced that wait with compression and gave users something to look at before the transfer had finished. Its interlacing option stores rows in four widely spaced passes, allowing the rough shape of an image to appear first and become progressively sharper as more data arrives.
The compression came before GIF
The mathematical ancestry of GIF does reach back to the 1970s, but GIF itself does not. Abraham Lempel and Jacob Ziv described what became known as LZ77 in 1977 and followed it with LZ78 in 1978.
Those methods replace recurring sequences with references to information that has already appeared. Instead of repeatedly writing the same combination of symbols, an encoder builds a vocabulary from the data itself and sends shorter codes for patterns it recognises again.
Terry Welch, then working at Sperry Research, adapted the LZ78 approach into a faster dictionary method. His 1984 paper, “A Technique for High-Performance Data Compression,” supplied the version that became known by the initials LZW.
Wilhite adapted LZW for streams of indexed pixel values. GIF begins with codes representing individual palette entries, builds longer strings as it reads the image, and expands the code width as the dictionary grows, up to a maximum of 12 bits.
The date 1977 therefore belongs to one of LZW’s intellectual precursors, not to the invention of GIF. Wilhite’s contribution was to combine a practical version of that compression system with colour tables, image descriptors, interlacing, and a portable file structure suited to CompuServe’s network.
Animation was assembled in layers
The original 1987 specification already permitted a data stream to contain more than one image. Its appendix instructed decoders to process each image immediately and place it within a shared logical screen, but it provided little control over timing or what should happen to the previous image.
The later GIF89a specification added the machinery that made controlled animation practical. Despite the name “89a,” the surviving CompuServe programming reference carries a document date of July 31, 1990.
Its Graphic Control Extension can specify a delay in hundredths of a second, mark one palette entry as transparent, and tell the decoder how to dispose of an image before drawing the next one. A sequence of image blocks with those instructions can behave like a tiny silent film.
Infinite looping was not defined as a standard GIF89a behaviour. Netscape later used GIF’s application-extension mechanism to add a loop counter, and other browsers copied the convention until repeating animations became the form most users associated with the format.
A GIF animation can also update only the portion of the canvas that changes between frames. That was useful for small web graphics, but it is poorly suited to long clips in which nearly every pixel changes from one frame to the next.
A patent pushed the web toward PNG
The LZW implementation did not enter GIF as an obviously troublesome technology. Welch’s employer had filed a United States patent application in June 1983, and the patent was granted to Sperry in December 1985 before later passing to Unisys.
When Unisys began enforcing licensing requirements during the 1990s, developers discovered that creating GIF encoders could carry legal and financial obligations. The dispute did not change the arrangement of bytes inside existing GIFs, but it changed how software makers viewed the format.
PNG emerged as a patent-free replacement for lossless still images. The first W3C PNG recommendation, published in 1996, supported full-colour images, stronger lossless compression, and alpha transparency rather than GIF’s single fully transparent palette entry.
The United States LZW patent expired on June 20, 2003, and the remaining relevant international patents had expired by July 2004. By then PNG had become the normal choice for many static web graphics, but GIF had already secured another role through animation.
Why the old bytes still move
GIF survives partly because its limitations are predictable. Browsers, image editors, messaging platforms, operating systems, and decades of archived pages recognise the format, and the major browser families support both GIF images and simple animation.
That does not make GIF efficient. Google’s comparison of animated formats found that conversions to lossy WebP were substantially smaller than the original GIFs, while even lossless WebP reduced average file size in its test collection.
Modern formats can also carry millions of colours and a full alpha channel. Technical superiority, however, does not automatically erase a format already embedded in browsers, messaging platforms, editing software, and decades of archived pages.
The internet still relies on layered systems whose oldest components remain difficult to coordinate away, whether it is the 1980s architecture behind DNS lookups or ocean routes first established by the earliest transatlantic telegraph cables.
Open a GIF in a hex editor today and the old structure is still visible: a six-character header, a logical screen, colour tables, image blocks, compressed codes, extensions, and the final hexadecimal byte 0x3B. The pictures move quickly now, but underneath them the dial-up format is still counting colours, building its 12-bit dictionary, and waiting for the same terminator CompuServe specified in 1987.
