Fix harmonize:images thumb rebuild and allow oversized museum scans.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
6656f91f25
commit
89e39d408a
@@ -1691,7 +1691,13 @@ async function generateThumbnailFromFull(fullDest, thumbDest, width = THUMB_WIDT
|
||||
if (!fs.existsSync(fullDest)) return false;
|
||||
|
||||
const ext = path.extname(thumbDest).toLowerCase();
|
||||
let pipeline = sharp(fullDest).rotate().resize({ width, withoutEnlargement: true });
|
||||
// Museum scans can exceed Sharp's default ~268MP input cap; we only resize down.
|
||||
let pipeline = sharp(fullDest, {
|
||||
limitInputPixels: false,
|
||||
sequentialRead: true,
|
||||
})
|
||||
.rotate()
|
||||
.resize({ width, withoutEnlargement: true });
|
||||
|
||||
if (ext === '.png') {
|
||||
pipeline = pipeline.png({ quality: 85 });
|
||||
|
||||
Reference in New Issue
Block a user