mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 13:29:22 +00:00
Fix image orientation issue
This commit is contained in:
parent
c3f82ad117
commit
fcebb9efb6
@ -107,6 +107,11 @@ export class RequestHandler extends BaseRequestsHandler {
|
|||||||
img = img.resize(Math.floor((stats.width*maxH)/stats.height), maxH);
|
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
|
// Save image
|
||||||
await img.png().toFile(targetSysPath);
|
await img.png().toFile(targetSysPath);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user