Better handle thumbnail generation of extreme aspect ratio images (fixes #3794)
* Backport fix taken from ART * Enforce minimal thumbnail size of 1x1 px in two places, prevents divison by zero and empty image generation
This commit is contained in:
@@ -344,8 +344,9 @@ bool BatchQueue::loadBatchQueue ()
|
||||
|
||||
auto job = rtengine::ProcessingJob::create (source, thumb->getType () == FT_Raw, pparams, fast);
|
||||
|
||||
const auto prevh = getMaxThumbnailHeight ();
|
||||
const auto prevw = thumb->getThumbnailWidth(prevh, &pparams);
|
||||
auto prevh = getMaxThumbnailHeight();
|
||||
auto prevw = prevh;
|
||||
thumb->getThumbnailSize(prevw, prevh, &pparams);
|
||||
|
||||
auto entry = new BatchQueueEntry (job, pparams, source, prevw, prevh, thumb, options.overwriteOutputFile);
|
||||
thumb->decreaseRef (); // Removing the refCount acquired by cacheMgr->getEntry
|
||||
|
Reference in New Issue
Block a user