-
Notifications
You must be signed in to change notification settings - Fork 11
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
the quality in PNG export is a bit pixelated #137
Comments
Can you describe what engine you're using? Is this p5? |
Oh sorry about that bit I am using the react engine @munusshih |
That's okay! Can you post your code here so we can better test it out and figure out the problem? Thanks! |
yeah sure @munusshih
but i didn't defined any export options because it is handled via the various react dependencies |
@kunaumadein Which browser are you using to run the design tool? |
@runemadsen i am using chrome |
Thanks @kunaumadein! Would it be possible for you to upload the entire code in a GitHub repository, so we can see what's going on? Also, since this is the React engine, does the SVG output look ok? |
The SVG output looks good but i wanted to provide my client that he only uses PNG for various kinds of socia media platforms. And i just uploaded my whole project @runemadsen |
Hello @runemadsen |
I just looked into this, and it's a problem related to how we convert SVG to PNG in |
Ah ok i see @runemadsen thx for the answer! |
Sorry, just updated my comment. Thanks for posting all of this. It's super helpful as we keep developing the framework, and we'll try to get this fixed as soon as we can. |
Thanks for the support and am very curious about the future updates! |
Ok, so we've done some testing and research and found the cause of the issue. We use Canvas under the hood to convert the SVG to a PNG. Canvas by default treats pixel values as being pixel values at an old monitor's density (72dpi), so when exporting the preview SVG (which in theory has an infinitely high resolution) gets compressed to 72dpi. So technically this is "expected behavior"—but very annoying behavior. This is why we're currently exploring possibilities of adding the option to select the export pixel density to Mechanic. A promising-looking work in progress of this is in this PR: #144 This would then work similar to how you'd export a PNG from Illustrator, allowing you to choose if you want the image to be at In the meantime a work-around could be to just double all sizes so you export your PNG at double the size. When scaled down to 50% this will yield a retina-compatible PNG. At least that's how I've exported Retina-ready assets from Mechanic in the past. Again, thanks so much for opening this issue 😊 We'll keep updating this issue with progress and release schedule on the export density feature. |
Hello,
so I don't want to make it a bug report but I just have a question. When I export my graphic as PNG (with the dimensions 1200x627) my graphic looks a bit pixelated.
So my question would have been if you can also export with quality to JPG via mechanic.design or if the export of my graphic is in double size without having to set the width and the height.
Below is a screenshot of what my export looks like (beneath my export and above the my prototype).
Thanks in advance!
The text was updated successfully, but these errors were encountered: