Skip to content

Commit

Permalink
imageio_rawspeed: workaround for white level magic value
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos committed Jan 30, 2024
1 parent 587f20e commit 50a5cb9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/imageio/imageio_rawspeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,6 @@ dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t *img,
img->raw_black_level = CLAMP(roundf(black), 0, UINT16_MAX);
}

/*
* FIXME
* if(r->whitePoint == 65536)
* ???
*/

/* free auto pointers on spot */
d.reset();
storage.reset();
Expand Down Expand Up @@ -265,6 +259,8 @@ dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t *img,
img->flags |= DT_IMAGE_HDR;

// we assume that image is normalized before.
// use 1.0f as binary32 for white point magic value.
if(r->whitePoint == 65535) img->raw_white_point = 0x3f800000U;
// FIXME: not true for hdrmerge DNG's.
for(int k = 0; k < 4; k++) img->buf_dsc.processed_maximum[k] = 1.0f;
}
Expand Down

0 comments on commit 50a5cb9

Please sign in to comment.