Skip to content

Commit 0ff8b6f

Browse files
committed
Ensure consistent byte order in PNG file
The PNG file format maintains consistent byte order across different systems, despite variations in the underlying system's native endianness.
1 parent e350d40 commit 0ff8b6f

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/image.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,9 @@ typedef enum {
4949
* - GIF:
5050
* https://www.file-recovery.com/gif-signature-format.htm
5151
*/
52-
#if __BYTE_ORDER == __BIG_ENDIAN
5352
static const uint8_t header_png[8] = {
5453
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A,
5554
};
56-
#else
57-
static const uint8_t header_png[8] = {
58-
0x0A, 0x1A, 0x0A, 0x0D, 0x47, 0x4E, 0x50, 0x89,
59-
};
60-
#endif
6155
static const uint8_t header_jpeg[3] = {0xFF, 0xD8, 0xFF};
6256
static const uint8_t header_gif[4] = {0x47, 0x49, 0x46, 0x38};
6357

0 commit comments

Comments
 (0)