-
-
Notifications
You must be signed in to change notification settings - Fork 258
Open
Description
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")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
