JavaScript-Load-Image icon indicating copy to clipboard operation
JavaScript-Load-Image copied to clipboard

Unexpected behaviour when passing string as orientation option

Open titenis opened this issue 3 years ago • 0 comments

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?

titenis avatar Mar 23 '22 08:03 titenis