Skip to content

Commit

Permalink
[DNGDecoder] Images consisting of a single padded tile are well-formed
Browse files Browse the repository at this point in the history
"Topaz Photo AI" seems to be producing such rather weird files.
Looking at the actual images, it's *clearly* a bug in said software.

But there is an argument to be made that [DNG] tiles can have
padding rows/cols, and while it may seem, err, non-conventional,
to have a single tile with size much larger than the actual image size,
that isn’t exactly illegal.

https://discuss.pixls.us/t/darktable-dxo-topaz-raw-denoise-dngs/37127/14


Co-authored-by: Miloš Komarčević <[email protected]>
  • Loading branch information
LebedevRI and kmilos committed May 19, 2023
1 parent 8f42ba6 commit 9c5e0f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librawspeed/decoders/DngDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ DngDecoder::getTilingDescription(const TiffIFD* raw) const {
? raw->getEntry(TiffTag::ROWSPERSTRIP)->getU32()
: mRaw->dim.y;

if (yPerSlice == 0 || yPerSlice > static_cast<uint32_t>(mRaw->dim.y) ||
if (yPerSlice == 0 ||
roundUpDivision(mRaw->dim.y, yPerSlice) != counts->count) {
ThrowRDE("Invalid y per slice %u or strip count %u (height = %u)",
yPerSlice, counts->count, mRaw->dim.y);
Expand Down

0 comments on commit 9c5e0f9

Please sign in to comment.