Search code examples
image-processinggif

Does the GIF 89a specification actually specify byte order?


In doing some research recently, I came across this article, which states:

All multi-byte values in GIF structures are in little-endian order (low byte goes first).

However, in the GIF89a specification, I was unable to find any mention of byte ordering. Specific, in the section on Logical Screen Descriptor block discussion on Logical Screen Width, which I believe is the first section to utilize multi-byte numbers, no mention is made to the byte ordering of the numbers. This would lead me to believe that the byte ordering is the same as bit ordering within a byte (i.e. most significant byte first), but encoders seem to follow the opposite standard.

Is there mention of byte ordering in the specification, and if not, why is little endian used by encoders?


Solution

  • Ah! I found it after all. For future readers, it is specified in the Glossary under "Byte Ordering".