Change order of image/raw loading to generate thumbnails
This commit is contained in:
parent
4f4a3d2336
commit
02e8d3f33c
@ -248,44 +248,44 @@ void Thumbnail::_generateThumbnailImage()
|
|||||||
cfs.exifValid = false;
|
cfs.exifValid = false;
|
||||||
cfs.timeValid = false;
|
cfs.timeValid = false;
|
||||||
|
|
||||||
// RAW works like this:
|
// this will load formats supported by imagio (jpg, png, jxl, and tiff)
|
||||||
// 1. if we are here it's because we aren't in the cache so load the JPG
|
tpp = rtengine::Thumbnail::loadFromImage(fname, tw, th, -1, pparams->wb.equal, pparams->wb.observer);
|
||||||
// image out of the RAW. Mark as "quick".
|
|
||||||
// 2. if we don't find that then just grab the real image.
|
|
||||||
bool quick = false;
|
|
||||||
|
|
||||||
rtengine::eSensorType sensorType = rtengine::ST_NONE;
|
|
||||||
|
|
||||||
if (initial_ && options.internalThumbIfUntouched) {
|
|
||||||
quick = true;
|
|
||||||
tpp = rtengine::Thumbnail::loadQuickFromRaw(fname, sensorType, tw, th, 1, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!tpp) {
|
|
||||||
quick = false;
|
|
||||||
tpp = rtengine::Thumbnail::loadFromRaw(fname, sensorType, tw, th, 1, pparams->wb.equal, pparams->wb.observer, TRUE, &(pparams->raw));
|
|
||||||
}
|
|
||||||
|
|
||||||
cfs.sensortype = sensorType;
|
|
||||||
|
|
||||||
if (tpp) {
|
if (tpp) {
|
||||||
cfs.format = FT_Raw;
|
cfs.format = FT_Custom;
|
||||||
cfs.thumbImgType = quick ? CacheImageData::QUICK_THUMBNAIL : CacheImageData::FULL_THUMBNAIL;
|
|
||||||
infoFromImage(fname);
|
infoFromImage(fname);
|
||||||
|
|
||||||
if (!quick) {
|
|
||||||
cfs.width = tpp->full_width;
|
|
||||||
cfs.height = tpp->full_height;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tpp) {
|
if (!tpp) {
|
||||||
// this will load formats supported by imagio (jpg, png, jxl, and tiff)
|
// RAW works like this:
|
||||||
tpp = rtengine::Thumbnail::loadFromImage(fname, tw, th, -1, pparams->wb.equal, pparams->wb.observer);
|
// 1. if we are here it's because we aren't in the cache so load the JPG
|
||||||
|
// image out of the RAW. Mark as "quick".
|
||||||
|
// 2. if we don't find that then just grab the real image.
|
||||||
|
bool quick = false;
|
||||||
|
|
||||||
|
rtengine::eSensorType sensorType = rtengine::ST_NONE;
|
||||||
|
|
||||||
|
if (initial_ && options.internalThumbIfUntouched) {
|
||||||
|
quick = true;
|
||||||
|
tpp = rtengine::Thumbnail::loadQuickFromRaw(fname, sensorType, tw, th, 1, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!tpp) {
|
||||||
|
quick = false;
|
||||||
|
tpp = rtengine::Thumbnail::loadFromRaw(fname, sensorType, tw, th, 1, pparams->wb.equal, pparams->wb.observer, TRUE, &(pparams->raw));
|
||||||
|
}
|
||||||
|
|
||||||
|
cfs.sensortype = sensorType;
|
||||||
|
|
||||||
if (tpp) {
|
if (tpp) {
|
||||||
cfs.format = FT_Custom;
|
cfs.format = FT_Raw;
|
||||||
|
cfs.thumbImgType = quick ? CacheImageData::QUICK_THUMBNAIL : CacheImageData::FULL_THUMBNAIL;
|
||||||
infoFromImage(fname);
|
infoFromImage(fname);
|
||||||
|
|
||||||
|
if (!quick) {
|
||||||
|
cfs.width = tpp->full_width;
|
||||||
|
cfs.height = tpp->full_height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user