Skip to content

Commit a9a8880

Browse files
authored
Merge pull request #635 from kmilos/kmilos/dng_float_white
DngDecoder: use uninitialized white point value for float DNGs
2 parents 0804b2b + f2ad598 commit a9a8880

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librawspeed/decoders/DngDecoder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,8 @@ void DngDecoder::handleMetadata(const TiffIFD* raw) {
603603
mRaw->whitePoint = implicit_cast<int>((1UL << bps) - 1UL);
604604
} else if (mRaw->getDataType() == RawImageType::F32) {
605605
// Default white level is 1.0f. But we can't represent that here.
606-
mRaw->whitePoint = 65535;
606+
// Fall back to uninitialized value instead.
607+
mRaw->whitePoint = 65536;
607608
}
608609

609610
if (raw->hasEntry(TiffTag::WHITELEVEL)) {

0 commit comments

Comments
 (0)