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

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

Open
llamerr opened this issue Jan 27, 2016 · 0 comments
Open

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

llamerr opened this issue Jan 27, 2016 · 0 comments

Comments

@llamerr
Copy link

llamerr commented Jan 27, 2016

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)

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

1 participant