Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour when passing string as orientation option #145

Open
titenis opened this issue Mar 23, 2022 · 0 comments
Open

Unexpected behaviour when passing string as orientation option #145

titenis opened this issue Mar 23, 2022 · 0 comments

Comments

@titenis
Copy link

titenis commented Mar 23, 2022

Original image:
orientatedCodePhoto

"blueimp-load-image": "5.16.0",
When orientation is number I get proper result:
const { image } = await loadImage(file, { orientation: 6, canvas: true, });
image
When orientation is string I get distorted image. The width ant height dimensions are correct, but the actual image is not rotated and get somehow cropped:
const { image } = await loadImage(file, { orientation: "6", canvas: true, });
image

A fix would be maybe to throw error when non number or non boolean value is used for orientation option, or enable non integer values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant