Auto rotate image (#737)

This commit is contained in:
Kendell R 2024-05-22 16:43:56 -07:00 committed by GitHub
parent 8d166ca642
commit da0e9204c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ if (BROWSER_ENV) {
const metadata = await img.metadata();
const rawChannels = metadata.channels;
let { data, info } = await img.raw().toBuffer({ resolveWithObject: true });
let { data, info } = await img.rotate().raw().toBuffer({ resolveWithObject: true });
const newImage = new RawImage(new Uint8ClampedArray(data), info.width, info.height, info.channels);
if (rawChannels !== undefined && rawChannels !== info.channels) {