Skip to content

Seems it doesn't have canvas size limit check? #31

@llamerr

Description

@llamerr

So when I'm taking photo and selecting max size that I can select - canvas size is set to values that is not supported by my IPhone.

canvas.width = this.options.width / this.scale;
canvas.height = this.options.height / this.scale;

width is set to 2448, height is set to 3264, which is almost 8MPx and canvas is become broken (empty or something)
http://stackoverflow.com/a/22345796/319375

I'm fixed it by this code

canvas.width = 640;//this.options.width / this.scale;
canvas.height = 640;//this.options.height / this.scale;
-----------
context.drawImage(this.imgFull, -sourceX, -sourceY, this.options.width/this.scale, this.options.height/this.scale, 0, 0, 640, 640);

Is there plans to add some global fix for this? I may add PR later when I figure out how to make it work universally (not just 640x640 I'm interesting in)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions