Handle linear DNG as other raw images (#6442)
RawTherapee already handle linear DNGs as a RawImageSource but the red, green, blue RawImageSource arrays aren't populated. So operations that rely on them like Highlight recovery with color Propagation and Retinex have no effect. This patch populates the above arrays by calling nodemoasic for images that have 3 color and not a CFA. Then these channels will be used by RawImageSource::getImage like done with CFA or monochrome images
This commit is contained in:
@@ -878,7 +878,7 @@ void RawImageSource::nodemosaic(bool bw)
|
||||
for (int j = 0; j < W; j++) {
|
||||
if (bw) {
|
||||
red[i][j] = green[i][j] = blue[i][j] = rawData[i][j];
|
||||
} else if(ri->getSensorType() != ST_FUJI_XTRANS) {
|
||||
} else if(ri->getSensorType() == ST_BAYER) {
|
||||
switch( FC(i, j)) {
|
||||
case 0:
|
||||
red[i][j] = rawData[i][j];
|
||||
@@ -895,7 +895,7 @@ void RawImageSource::nodemosaic(bool bw)
|
||||
red[i][j] = green[i][j] = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
} else if(ri->getSensorType() == ST_FUJI_XTRANS) {
|
||||
switch( ri->XTRANSFC(i, j)) {
|
||||
case 0:
|
||||
red[i][j] = rawData[i][j];
|
||||
@@ -912,6 +912,10 @@ void RawImageSource::nodemosaic(bool bw)
|
||||
red[i][j] = green[i][j] = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
red[i][j] = rawData[i][j * 3 + 0];
|
||||
green[i][j] = rawData[i][j * 3 + 1];
|
||||
blue[i][j] = rawData[i][j * 3 + 2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user