Skip to content

Pica randomly retiles certain images #251

@ipb26

Description

@ipb26

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions