RawTherapee crashed after opening linear DNG from Sigma SD H Quattro camera in editor. fixes #3559

This commit is contained in:
heckflosse
2016-12-30 16:11:21 +01:00
parent cc8dae26ff
commit 8d52510381
3 changed files with 12 additions and 0 deletions

View File

@@ -466,6 +466,10 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati
int left_margin = ri->get_leftmargin();
firstgreen += left_margin;
int top_margin = ri->get_topmargin();
if(ri->get_maker() == "Sigma" && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing
tmpw = (width - 2 - left_margin) / hskip;
tmph = (height - 2 - top_margin) / vskip;
}
for (int row = 1 + top_margin, y = 0; row < iheight + top_margin - 1 && y < tmph; row += vskip, y++) {
rofs = row * iwidth;