From da0e9204c49839fa59a726b8d5f9bd76bf003666 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 22 May 2024 16:43:56 -0700 Subject: [PATCH] Auto rotate image (#737) --- src/utils/image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/image.js b/src/utils/image.js index 1ee77d900..89bb2481b 100644 --- a/src/utils/image.js +++ b/src/utils/image.js @@ -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) {