-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
base64 menu icon with Retina resolution #314
Comments
@JayBrown Have you tried opening the image in Preview.app and changing the resolution to 144 pixels/inch prior to making the base64 data? Don't change the dimensions, just the resolution, from the default 72 to 144. That's what I've been doing and it seems to create a high res image for display in the menu for me. Some examples. Below are custom icons I made for some menu plugins I'm working on. First one is how they both display on a Mid 2014 MBP Retina. And how the same icons from the same plug-ins appear on a Mid 2012 MBP (with older display) Quite a big difference, so it seems to work OK for me using the above technique. The OS simply scales the image resolution down accordingly when its being used on a non Retina system, so the trick is to create the image data with the higher display resolution (not size) in mind, and OS X will take care of the rest. |
I've now encoded the icon at 144 ppi and 36x36 pixels. On my legacy display OS X automatically downscales to 72 ppi, which results in the necessary 18x18 pixels. I think that's what I was looking for. Thank you! |
Retina works as well. Splendid. |
Having some trouble generating a "universal" base64-encoded PNG data that has the correct size on non-Retina displays. Can one of you guys post one of the ones that is working for you so I can play around with it? |
This is one of the PNG data strings that worked on both Retina and older Macs:
|
Using base64 for the menu icon works great… on Macs with legacy resolutions. But is there a way to use a higher icon resolution/size for Retina displays? (I tried by simply doubling the standard 18x18 size to 36x36, but it doesn't work.)
The text was updated successfully, but these errors were encountered: