Added alert dialog. Fixed image rotation EXIT data being discarded.
This commit is contained in:
@@ -358,6 +358,7 @@ async function writeThumbnail(image, thumbpath) {
|
||||
withoutEnlargement: true,
|
||||
})
|
||||
.jpeg({ quality: config.media.thumbnailQuality })
|
||||
.rotate()
|
||||
.toFile(path.join(config.media.path, thumbpath));
|
||||
}
|
||||
|
||||
@@ -368,6 +369,7 @@ async function writeLazy(image, lazypath) {
|
||||
withoutEnlargement: true,
|
||||
})
|
||||
.jpeg({ quality: config.media.lazyQuality })
|
||||
.rotate()
|
||||
.toFile(path.join(config.media.path, lazypath));
|
||||
}
|
||||
|
||||
@@ -444,8 +446,9 @@ async function storeImageFile(media, hashDir, hashSubDir, filename, filedir, fil
|
||||
},
|
||||
meta: {
|
||||
...media.meta,
|
||||
width: info.width,
|
||||
height: info.height,
|
||||
// 6 or 8 implies image is sideways, and size is not inherently adjusted for orientation
|
||||
width: info.orientation === 6 || info.orientation === 8 ? info.height : info.width,
|
||||
height: info.orientation === 6 || info.orientation === 8 ? info.width : info.height,
|
||||
entropy: stats?.entropy || null,
|
||||
sharpness: stats?.sharpness || null,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user