From d838ff352dd21c8ebe753d6fa46af607a4f66ced Mon Sep 17 00:00:00 2001 From: Lawrence37 <45837045+Lawrence37@users.noreply.github.com> Date: Tue, 30 Aug 2022 05:49:46 -0700 Subject: [PATCH] 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. --- rtengine/dcraw.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index e4dbcbf94..c91a73f62 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -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;