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

Pica randomly retiles certain images #251

Open
ipb26 opened this issue Mar 6, 2025 · 7 comments
Open

Pica randomly retiles certain images #251

ipb26 opened this issue Mar 6, 2025 · 7 comments

Comments

@ipb26
Copy link

ipb26 commented Mar 6, 2025

Resizing the attached image with Pica turns it into the second attached image. This seems to happen randomly with photos taken on certain devices.

I am not doing anything fancy, the only option I'm passing to the Pica constructor is the idle option, and I'm not passing any options to Pica.resize or Pica.toBlob. This code works for 99% of the photos I put through it.

const image = await loadImage(dataUrl) // this method is from image-promise lib
const canvas = document.createElement("canvas")
canvas.width = 1774
canvas.height = 2365
const resized = await FileManager.Pica.resize(image, canvas)
const blob = await FileManager.Pica.toBlob(resized, "image/jpeg")

Image
Image

@cinemast
Copy link

cinemast commented Mar 6, 2025

Hi I have the same issue.

Image

Image

@cinemast
Copy link

cinemast commented Mar 6, 2025

I tried also to use only "js" feature to rule out any hardware issues, but still the same result.
This does not happen on your demo page for whatever reason. Using the latest version ("pica": "^9.0.1").

const pica = new Pica({ features: ["js"] });

@rodrigues-t
Copy link

did you guys find a solution? I have the same issue. I noticed that it only happens to me when I pick up an image from the Mac Photos app.

@tomsvogel
Copy link

same here, anyone found a solution? only on apple fotos with google chrome

@rodrigues-t
Copy link

same here, anyone found a solution? only on apple fotos with google chrome

Unfortunately no. I replaced it with cropperjs.

@tomsvogel
Copy link

same here, anyone found a solution? only on apple fotos with google chrome

Unfortunately no. I replaced it with cropperjs.

is it possible with cropper.js to resize images without user interaction?

@capc0
Copy link

capc0 commented Apr 3, 2025

see here #217

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

5 participants