Skip to content

Commit

Permalink
imageio_dng: create little-endian files
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos committed Jan 29, 2024
1 parent 0885158 commit 9a8638c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/imageio/imageio_dng.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
static inline void _imageio_dng_write_buf(uint8_t *buf, const uint32_t d, const int val)
{
if(d + 4 >= HEADBUFFSIZE) return;
buf[d + 3] = val & 0xff;
buf[d + 2] = (val >> 8) & 0xff;
buf[d + 1] = (val >> 16) & 0xff;
buf[d] = val >> 24;
buf[d] = val & 0xff;
buf[d + 1] = (val >> 8) & 0xff;
buf[d + 2] = (val >> 16) & 0xff;
buf[d + 3] = val >> 24;
}

static inline int _imageio_dng_make_tag(
Expand Down Expand Up @@ -92,10 +92,10 @@ static inline void _imageio_dng_write_tiff_header(

memset(buf, 0, sizeof(buf));
/* TIFF file header. */
buf[0] = 0x4d;
buf[1] = 0x4d;
buf[3] = 42;
buf[7] = 8;
buf[0] = 0x49;
buf[1] = 0x49;
buf[2] = 42;
buf[4] = 8;
uint32_t b = 10;

// If you want to add other tags written to a dng file include the the ID in the enum to
Expand Down

0 comments on commit 9a8638c

Please sign in to comment.