Skip to content

Commit da0e920

Browse files
authored
Auto rotate image (#737)
1 parent 8d166ca commit da0e920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (BROWSER_ENV) {
3939
const metadata = await img.metadata();
4040
const rawChannels = metadata.channels;
4141

42-
let { data, info } = await img.raw().toBuffer({ resolveWithObject: true });
42+
let { data, info } = await img.rotate().raw().toBuffer({ resolveWithObject: true });
4343

4444
const newImage = new RawImage(new Uint8ClampedArray(data), info.width, info.height, info.channels);
4545
if (rawChannels !== undefined && rawChannels !== info.channels) {

0 commit comments

Comments
 (0)