You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Maintaining transparency when creating custom icons

There was a long and helpful thread here about the necessity to create square images when making custom icons for folders and hard drives in Mojave.

Custom folder icons are blurry - Apple Community


My problem is related, and happens even when the custom icon is square. Even if my custom icon is a png or gif file, saved as transparent, the borders of the icon on my desktop are white, not transparent - something that was never a problem pre-Mojave.


Has anyone found any solutions for this? Not a world-shaking problem, but annoying if you have a dozen hard drive icons hanging off a Mac Pro.


Thanks,


Myles


Posted on Feb 1, 2020 3:48 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 1, 2020 5:11 AM

Folder icons are really made from Apple Icon Image format (.icns) files, not .png. A typical .icns has 10 images within it — five each at 72 dpi and five each at 144 dpi. The dimensions range from 16x16 to 512x512.


If you have created a 512x512 300 dpi image in a vector graphics tool where you have exported it with a transparent background as a .png image, you can open that in Preview, and then export to a .icns image format. You will need to press the option key when choosing the image format menu in Preview's export panel to access the iCNS selection.


I also have a Python program that uses Objective-C to set an .icns icon on a designated folder. Using an Apple Accounts.icns image, and a new Test folder on my Desktop, here is the result with transparency preserved:


1 reply
Question marked as Top-ranking reply

Feb 1, 2020 5:11 AM in response to mylesdevon

Folder icons are really made from Apple Icon Image format (.icns) files, not .png. A typical .icns has 10 images within it — five each at 72 dpi and five each at 144 dpi. The dimensions range from 16x16 to 512x512.


If you have created a 512x512 300 dpi image in a vector graphics tool where you have exported it with a transparent background as a .png image, you can open that in Preview, and then export to a .icns image format. You will need to press the option key when choosing the image format menu in Preview's export panel to access the iCNS selection.


I also have a Python program that uses Objective-C to set an .icns icon on a designated folder. Using an Apple Accounts.icns image, and a new Test folder on my Desktop, here is the result with transparency preserved:


Maintaining transparency when creating custom icons

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.