Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(not for merge) imageio_rawspeed changes for pending submodule update #16185

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/imageio/imageio_rawspeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,14 @@ 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->blackAreas.empty() || r->blackLevelSeparate[0] == -1
|| r->blackLevelSeparate[1] == -1
|| r->blackLevelSeparate[2] == -1
|| r->blackLevelSeparate[3] == -1)
if(!r->blackAreas.empty() || !r->blackLevelSeparate)
{
r->calculateBlackAreas();
}

const auto bl = *(r->blackLevelSeparate->getAsArray1DRef());
for(uint8_t i = 0; i < 4; i++)
img->raw_black_level_separate[i] = r->blackLevelSeparate[i];
img->raw_black_level_separate[i] = bl(i);

if(r->blackLevel == -1)
{
Expand Down Expand Up @@ -398,7 +396,7 @@ dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t *img,
r->metadata.model.c_str(),
r->metadata.mode.c_str());

if(cam && cam->supportStatus == Camera::SupportStatus::NoSamples)
if(cam && cam->supportStatus == Camera::SupportStatus::SupportedNoSamples)
img->camera_missing_sample = TRUE;
}
catch(const std::exception &exc)
Expand Down Expand Up @@ -551,7 +549,7 @@ dt_imageio_retval_t dt_imageio_open_rawspeed_sraw(dt_image_t *img,
r->metadata.model.c_str(),
r->metadata.mode.c_str());

if(cam && cam->supportStatus == Camera::SupportStatus::NoSamples)
if(cam && cam->supportStatus == Camera::SupportStatus::SupportedNoSamples)
img->camera_missing_sample = TRUE;

return DT_IMAGEIO_OK;
Expand Down
Loading