-
-
Notifications
You must be signed in to change notification settings - Fork 281
Mac Retina devices now generate Images at 2x (since Eclipse 4.12) #651
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
Comments
This was introduced in Eclipse 4.12. https://www.eclipse.org/eclipse/news/4.12/platform.php#mac-hidpi "On Mac, images and text are now drawn in high resolution during GC operations. You can see crisp images on high resolution displays in the editor rulers, forms, etc in Eclipse." I guess this must mean that images have to be exported at 2x size as we do on Windows. |
#596 is related to this. It's a pain that if an Image is generated on hi-res devices we have to export it at 2x the logical size in order to retain quality. Next experiment - generate image at 200% scale then use ImageData at 50%. |
No, looks terrible. I've just realised that the issue is due to the DPI in the exported image. If I take a Mac screen shot of an Archi diagram the DPI is 144 pixels/inch. The Image export and copy to clipboard routines in Archi rely on Eclipse's Image and ImageData classes that create images with a DPI of 72 pixels/inch. So in theory what we need to do is get the ImageData at 200 but export the image with double DPI. I don't even know if that's possible. |
Nope - can't change the DPI in Eclipse. But what I don't understand is that some Image editing apps on Mac Retina (Pixelmator) will show the exported image at half its size. https://www.pixelmator.com/community/viewtopic.php?f=5&t=15038 😕 (Paging @jbsarrodie who understands this stuff) |
* Since Eclipse 4.12 Mac images are rendered at hi-res * See #651
So, if we could set the DPI of the images to 144 we would have a great result. We can't do that in Eclipse...but we can change the DPI by re-loading, setting the DPI, and saving the file again using some Java code I found: https://stackoverflow.com/questions/321736/how-to-set-dpi-information-in-an-image/43043998 This actually works. But only so far for PNG files. |
Not really. Setting the DPI in the image to 144 makes it look the "right size" in the Preview app on Mac but not in a Browser. And the whole point of this DPI experiment was to make the images look the "right size" in the Browser, so there's no point in doing this. Here's a summary of my findings: When Eclipse creates an Image it creates it on a So, users with retina / hi-res devices have a choice:
And so in Archi 4.7.1 beta 2 this choice will appear in Preferences (this Preference is already in Archi 4.7 but only for Windows): Linux users are not affected by this issue...yet. |
* Since Eclipse 4.12 Mac images are rendered at hi-res * See #651
* Since Eclipse 4.12 Mac images are rendered at hi-res * See #651
This is in Archi 4.7.1 |
This affects Archi 4.6 and later on Mac Retina devices.
If you export an image to PNG or do "Copy As image to Clipboard" the outlines in the resulting image will look like they are anti-aliased and not solid. You can see this if you zoom in on the resulting image. The outlines should be solid.
I investigated this and found that it seems to be an issue in Eclipse.
I have reported this issue to Eclipse - https://bugs.eclipse.org/bugs/show_bug.cgi?id=565138
One workaround is to go into Archi's Preferences, General, and check "Export images at 2x size". The images will be double-sized but at least will have solid outlines.
The text was updated successfully, but these errors were encountered: