PNG file format endianness?

泄露秘密 提交于 2019-11-29 13:23:00

Yes, according to the specification, integers must be in network byte order (big endian):

All integers that require more than one byte shall be in network byte order: the most significant byte comes first, then the less significant bytes in descending order of significance (MSB LSB for two-byte integers, MSB B2 B1 LSB for four-byte integers). The highest bit (value 128) of a byte is numbered bit 7; the lowest bit (value 1) is numbered bit 0. Values are unsigned unless otherwise noted. Values explicitly noted as signed are represented in two's complement notation.

http://www.w3.org/TR/2003/REC-PNG-20031110/#7Integers-and-byte-order

Integers in PNG are in network byte order (big endian).

See: the spec.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!