Skip to content

Commit

Permalink
dt_imageio_open_rawspeed(): always calculate black areas
Browse files Browse the repository at this point in the history
In CR2's case, we might now read separate levels from the MakerNotes,
and thus never sample the (more correct) Black areas,
because separate black levels are no longer unset.

I'm surprised this wasn't being done in the first place,
handling of black areas seems to be a somewhat too ugly...
  • Loading branch information
LebedevRI committed Dec 11, 2023
1 parent 691bade commit 048ccc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imageio/imageio_rawspeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t *img,
img->raw_black_level = r->blackLevel;
img->raw_white_point = r->whitePoint;

if(r->blackLevelSeparate[0] == -1
if(!r->blackAreas.empty() || r->blackLevelSeparate[0] == -1
|| r->blackLevelSeparate[1] == -1
|| r->blackLevelSeparate[2] == -1
|| r->blackLevelSeparate[3] == -1)
Expand Down

0 comments on commit 048ccc8

Please sign in to comment.