Bugfix for '24 and 32 bit hdr dng images are not shown, Issue 2780', 'Dcraw.cc does not respect the Illuminant tags in DNG files, Issue 2776' and 'camconst.json support for raw files of various bit depths from the same camera model (12-bit, 14-bit), Issue 2778

This commit is contained in:
Ingo
2015-05-17 21:21:34 +02:00
parent 64426f7822
commit a36e2f6df0
3 changed files with 156 additions and 56 deletions

View File

@@ -449,14 +449,19 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene
bool black_from_cc = false;
if (cc) {
for (int i = 0; i < 4; i++) {
if (RT_blacklevel_from_constant) {
black_c4[i] = cblack[i] + cc->get_BlackLevel(i, iso_speed);
}
// load 4 channel white level here, will be used if available
if (RT_whitelevel_from_constant) {
maximum_c4[i] = cc->get_WhiteLevel(i, iso_speed, aperture);
}
}
if (RT_blacklevel_from_constant) {
black_c4[i] = cblack[i] + cc->get_BlackLevel(i, iso_speed);
}
// load 4 channel white level here, will be used if available
if (RT_whitelevel_from_constant) {
maximum_c4[i] = cc->get_WhiteLevel(i, iso_speed, aperture);
if(tiff_bps > 0 && !isFoveon()) {
unsigned compare = ((uint64_t)1 << tiff_bps) - 1; // use uint64_t to avoid overflow if tiff_bps == 32
while(maximum_c4[i] > compare)
maximum_c4[i] >>= 1;
}
}
}
}
if (black_c4[0] == -1) {
if(isXtrans())