-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 exports are automatically scaled up and cropped on 1.6RC #2744
Comments
can you post a fiddle that demonstrate the problem? thanks. |
facing same issue with 1.6RC, the strange thing is that it happens only when using my windows 10 laptop, it does not happen when using my ubuntu, both using the latest chrome. im not sure if its related to graphics capability of the laptop |
Solved in the below way: var fabricJScanvas = new fabric.Canvas('"myCanvasID"); Used: instead of: I dont know how this make scene, but its working. |
you did not solve, you avoided calling the dataUrl exporter. |
@asturur Here is an interesting example I just added to the You can see the canvas and how it gets rendered and then in the console you can see a couple data uri's, none of which look correct (except the last one which avoids the dataUrl exporter like above.) |
They all look correct to me except for the cropped one of which cannot guarantee correctness using only eyes. I'm using windows 8.1 and chrome. When i move in the windows 10 laptop i will test again. with chrome and edge. |
Here is an album of each of these images that i'm getting. On windows everything comes though correct, but on a mac it's wrong. Mac Version 10.11.3 (15D21) Google Chrome Version 47.0.2526.111 (64-bit) same thing happens on: Safari Version 9.0.3 (11601.4.4) |
You are getting the "retina enanched" version of the canvas. that is correct yes. When we prepare the canvas for toDataUrl we should reset the retina scaling maybe. This is a bug i will have tons of problem to iron out. |
Looks like you're correct. Setting |
@kangax what do you think, a mac user, should expect when dataurling his fabricjs canvas? To get the normal version everyone gets or to get the retina scaled version? because this decision influence the fix. |
I think retina version. |
Someone care to try #2806? it fixes retina export of canvas to dataUrl. |
@asturur Everything looks correct to me now (the 600px canvas is giving me 1200px images which is correct for mac). I've only checked a mac though, can someone check a PC? See if all the images corrospond to the ones I'm seeing Here is an fiddle with the new js from your pull request and Here is an album of each image. |
i'm on pc and it looks correct for me. |
When I use toDataUrl on a canvas, it exports the image scaled up and cropped.
It has the same behaviour even if I set multiplier, size or top/left position.
Reverting back to 1.5 fixed the issue.
The text was updated successfully, but these errors were encountered: