1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-26 13:38:52 +00:00

Fix image orientation issue

This commit is contained in:
Pierre HUBERT 2020-04-15 07:46:29 +02:00
parent c3f82ad117
commit fcebb9efb6

View File

@ -106,6 +106,11 @@ export class RequestHandler extends BaseRequestsHandler {
else
img = img.resize(Math.floor((stats.width*maxH)/stats.height), maxH);
}
// Rotate the image, if required
if(stats.orientation != undefined) {
img = img.rotate(/* use EXIF orientation header */)
}
// Save image
await img.png().toFile(targetSysPath);