Squashed image in iOS Safari
gippea opened this issue · 2 comments
gippea commented
Hi,
I'm using this library for a project to orientate the images correctly. So far so good.
But the canvas created in iPhone 6 (iOS Safari) is squashed to fit the horizontal bounds in portrait mode.
const image = await loadImage(
selectedMedia?.user_media,
function (img, data) {
alert("Original image width: " + data.originalWidth);
alert("Original image height: " + data.originalHeight);
alert(img.width + " - " + img.height);
console.dir(img);
setMediaContent(mediaRef.current);
console.log("orientation", orientation);
if (orientation === "portrait") {
mediaRef.current.style.setProperty(
"--media-captured-align-items",
"center"
);
} else {
mediaRef.current.style.setProperty(
"--media-captured-align-items",
"flex-start"
);
}
mediaRef.current.appendChild(img);
},
{
orientation: 1,
maxWidth:
orientation === "portrait"
? window.innerWidth
: window.innerHeight,
}
);
blueimp commented
blueimp commented
Closing as non-reproducible.