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

Signature is much larger than canvas when I use fromDataURL #332

Closed
Zuldra opened this issue Jan 12, 2018 · 4 comments
Closed

Signature is much larger than canvas when I use fromDataURL #332

Zuldra opened this issue Jan 12, 2018 · 4 comments

Comments

@Zuldra
Copy link

Zuldra commented Jan 12, 2018

Hello.

When I save a signature and then reload it using fromDataURL, the signature is multiplied in size and larger than the canvas. I am using the simplest implementation of a signature_pad in my app, so it seems there is an issue with signature_pad not allowing this behavior to be predictable and simple.

Can anyone please suggest me how to reload the image using fromDataURL with the same size as the original? And without complex canvas manipulation?

Thank you.

@psychochicken
Copy link

psychochicken commented Feb 7, 2018

Having the exact opposite problem as Zuldra. When reading a signature fromDataURL, the signature on the canvas is about 25% smaller. I've also got a very simple Signature Pad set up, be happy to give more details if needed.

After the same result, a way to reload image using fromDataUrl with the same size as original.

@n3b
Copy link

n3b commented Feb 12, 2018

@psychochicken .fromDataURL(url, {ratio: 1})

@wdmtech
Copy link

wdmtech commented May 19, 2019

@n3b You rock, my friend. Thanks!

@nikola1970
Copy link

@n3b thanks!

@UziTech UziTech closed this as completed Jun 18, 2021
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

6 participants