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

toDataURL: multiplier : 1 BUG #4617

Closed
evolutionjay opened this issue Jan 11, 2018 · 7 comments · Fixed by #4674
Closed

toDataURL: multiplier : 1 BUG #4617

evolutionjay opened this issue Jan 11, 2018 · 7 comments · Fixed by #4674
Labels

Comments

@evolutionjay
Copy link

Version

2.0

Test Case

none

Steps to reproduce

Useing Retina Screen and Canvas.enableRetinaScaling is true

useing toDataURL

options is

canvasObject.toDataURL({
  multiplier: 1
})

is 2x size bigger than Normal screen image

but I am try this:

canvasObject.toDataURL({
  multiplier: 0.5
})

It is work .

canvasObject.toDataURL({
  multiplier: 0.9999999999
})

also work very well

Expected Behavior

Actual Behavior

@asturur
Copy link
Member

asturur commented Jan 28, 2018

Hey @evolutionjay i would like to fix this, are you able to making a failing fiddle? Reading the code i cannot understand why it should happen.

@dmitry-kostin
Copy link

bump also have this issue on retina screen
created the fiddle https://jsfiddle.net/Lktr6jL0/

@asturur
Copy link
Member

asturur commented Feb 1, 2018

thanks!

@dmitry-kostin
Copy link

@asturur Could you confirm please can this be fixed anytime soon? Or should we start to search the solution by owns?

@asturur
Copy link
Member

asturur commented Feb 2, 2018

Well i cannot confirm, since i m swamped of work.
You should always have a look and point someone in the right direction or solve it by yourself bad give back the solution.

What i can say is that i hope is a quick fix to put in asap.

@asturur
Copy link
Member

asturur commented Feb 3, 2018

so i do not think there is any strange bug. retina canvas are double big.
Probably we should take care of this when exporting, but this is the default behaviour and has been like this since version 1.5, an 2.0 is in rc status.
What i can do is address with docs, if you do not want retina scaling on exported image use:

{ multiplier: 1/canvas.getRetinaScaling() }

changing code would not give you any difference that you cannot obtain like this

@asturur asturur added the docs label Feb 3, 2018
@asturur
Copy link
Member

asturur commented Feb 3, 2018

Ok since for object we offer an option, default to false, we can extend the same on the canvas.

@asturur asturur added bug and removed docs labels Feb 3, 2018
@asturur asturur mentioned this issue Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants