Remove last row from D5100 raws (#6571)

Avoid decoding the last row which contains corrupt data and causes the
image to become black.

Closes #5654.
This commit is contained in:
Lawrence37 2022-08-30 05:49:46 -07:00 committed by GitHub
parent 200e2de86b
commit d838ff352d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9763,6 +9763,8 @@ void CLASS identify()
if(!dng_version) {top_margin = 18; height -= top_margin; }
if (height == 3014 && width == 4096) /* Ricoh GX200 */
width = 4014;
if (height == 3280 && width == 4992 && !strncmp(model, "D5100", 5))
{ --height; } // Last row contains corrupt data. See issue #5654.
if (dng_version) {
if (filters == UINT_MAX) filters = 0;
if (filters) is_raw *= tiff_samples;