What descriptor follows the fixed-length header in a GIF file?

The story behind the answer

The descriptor that follows a GIF’s fixed-length header is the Logical Screen Descriptor.

Every GIF begins with a six-byte signature and version field: either GIF87a or GIF89a. Immediately after it comes the seven-byte Logical Screen Descriptor, which defines the virtual canvas on which the file’s images or animation frames are displayed. It records the canvas width and height, packed flags describing the global color table, the background-color index, and the pixel-aspect-ratio field.

The descriptor does not itself contain the complete image. If its flags indicate a Global Color Table, that table follows the descriptor. Later image sections can have their own Image Descriptor and optional Local Color Table, which is why the two names are easy to confuse. The Logical Screen Descriptor describes the overall GIF canvas; an Image Descriptor describes an individual image rectangle within it.

The term “header” is also a frequent source of imprecision. In casual explanations, people may call the whole opening area the header, but technically the fixed-length header is followed by the Logical Screen Descriptor. Trailer Descriptor is not the standard name for this structure, and the trailer appears at the end of the file.

Source: Wikipedia · fact-checked Sept. 2026

Add question to a list

Choose a list to keep this question in: