refactored code for extracting image dimensions from metadata

(cherry picked from commit 0ece9c5bfad09bc9052238d83fa696ef39effaaa)
This commit is contained in:
Alberto Griggio
2020-12-02 02:03:00 -08:00
committed by Lawrence Lee
parent 0102fca563
commit 92befa7e81
13 changed files with 146 additions and 21 deletions

View File

@@ -241,6 +241,10 @@ void Thumbnail::_generateThumbnailImage ()
cfs.format = FT_Raw;
cfs.thumbImgType = quick ? CacheImageData::QUICK_THUMBNAIL : CacheImageData::FULL_THUMBNAIL;
infoFromImage (fname);
if (!quick) {
cfs.width = tpp->full_width;
cfs.height = tpp->full_height;
}
}
}
@@ -893,6 +897,8 @@ int Thumbnail::infoFromImage (const Glib::ustring& fname)
cfs.filetype = "";
}
idata->getDimensions(cfs.width, cfs.height);
delete idata;
return deg;
}