Fix black thumb when applying a processing profile to a monochrome dng with wrong rgb_cam matrix
This commit is contained in:
@@ -333,6 +333,11 @@ skip_block:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (colors == 1)
|
if (colors == 1)
|
||||||
|
// there are monochrome cameras with wrong matrix. We just replace with this one.
|
||||||
|
rgb_cam[0][0] = 1; rgb_cam[1][0] = 0; rgb_cam[2][0] = 0;
|
||||||
|
rgb_cam[0][1] = 0; rgb_cam[1][1] = 1; rgb_cam[2][1] = 0;
|
||||||
|
rgb_cam[0][2] = 0; rgb_cam[1][2] = 0; rgb_cam[2][2] = 1;
|
||||||
|
|
||||||
for (c = 1; c < 4; c++) {
|
for (c = 1; c < 4; c++) {
|
||||||
cblack_[c] = cblack_[0];
|
cblack_[c] = cblack_[0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1593,7 +1593,7 @@ int RawImageSource::load (const Glib::ustring &fname)
|
|||||||
|
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
for (int j = 0; j < 3; j++) {
|
for (int j = 0; j < 3; j++) {
|
||||||
imatrices.rgb_cam[i][j] = ri->get_rgb_cam(i, j);
|
imatrices.rgb_cam[i][j] = ri->get_colors() == 1 ? (i == j) : ri->get_rgb_cam(i, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
// compute inverse of the color transformation matrix
|
// compute inverse of the color transformation matrix
|
||||||
|
|||||||
Reference in New Issue
Block a user