From 3b19b9f55b18042180969ad06babf1639dc528e2 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 7 Jun 2019 16:37:59 +0200 Subject: [PATCH] Rawtherapee 5.6 crashes with.dng from PixelShift2DNG-0.9.8.67, fixes #5348 --- rtengine/rawimage.cc | 2 +- rtengine/rtthumbnail.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 18848274a..1fa1630ab 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -767,7 +767,7 @@ float** RawImage::compress_image(unsigned int frameNum, bool freeImage) this->data[row][col] = image[row * width + col][0]; } } else { - if(get_maker() == "Sigma" && dng_version) { // Hack to prevent sigma dng files from crashing + if((get_maker() == "Sigma" || get_maker() == "Pentax" || get_maker() == "Sony") && dng_version) { // Hack to prevent sigma dng files and dng files from PixelShift2DNG from crashing height -= top_margin; width -= left_margin; } diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 1ee09dcf3..0a74cf8c2 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -714,7 +714,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int wmax = tmpw; int hmax = tmph; - if (ri->get_maker() == "Sigma" && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing + if ((ri->get_maker() == "Sigma" || ri->get_maker() == "Pentax" || ri->get_maker() == "Sony") && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing wmax = (width - 2 - left_margin) / hskip; hmax = (height - 2 - top_margin) / vskip; }