base64 menu icon with Retina resolution #314
Comments
mm2270
commented
Apr 6, 2016
|
@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. |
JayBrown
commented
Apr 6, 2016
|
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! |
JayBrown
commented
Apr 7, 2016
|
Retina works as well. Splendid. |
JayBrown
closed this
Apr 7, 2016
This was referenced Apr 8, 2016
milch
added a commit
to milch/bitbar
that referenced
this issue
Jun 12, 2016
|
|
milch |
e97a136
|
milch
referenced
this issue
Jun 12, 2016
Merged
Mention how to support retina icons in the README #339
iosdeveloper
added a commit
that referenced
this issue
Jun 12, 2016
|
|
milch + iosdeveloper |
2f49dce
|


JayBrown commentedApr 6, 2016
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.)