Skip to content

Commit

Permalink
Auto rotate image (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow authored May 22, 2024
1 parent 8d166ca commit da0e920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit da0e920

Please sign in to comment.