Added alert dialog. Fixed image rotation EXIT data being discarded.

This commit is contained in:
DebaucheryLibrarian
2021-04-04 21:52:19 +02:00
parent 837fc98ad2
commit da0cbced15
43 changed files with 1134 additions and 38 deletions

View File

@@ -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,
},