Skip to content

Commit

Permalink
Merge pull request #50 from weihsinyeh/png
Browse files Browse the repository at this point in the history
Ensure consistent byte order in PNG file
  • Loading branch information
jserv authored Sep 15, 2024
2 parents e350d40 + 0ff8b6f commit 45e4a5f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,9 @@ typedef enum {
* - GIF:
* https://www.file-recovery.com/gif-signature-format.htm
*/
#if __BYTE_ORDER == __BIG_ENDIAN
static const uint8_t header_png[8] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A,
};
#else
static const uint8_t header_png[8] = {
0x0A, 0x1A, 0x0A, 0x0D, 0x47, 0x4E, 0x50, 0x89,
};
#endif
static const uint8_t header_jpeg[3] = {0xFF, 0xD8, 0xFF};
static const uint8_t header_gif[4] = {0x47, 0x49, 0x46, 0x38};

Expand Down

0 comments on commit 45e4a5f

Please sign in to comment.