How do I make transparent backgrounds for icons used in the Dock?

When I find a JPEG or Icon that I want to use for a dock icon, why is it that sometimes when I open it in Preview and copy paste to the Get Info window of the icon I want to replace, that I get a white background and other times I don't (this happens with PNG, ICNS at times also). How do I make an icon have a transparent background so that it looks good on the dock and not surrounded by a white frame like I see in PNG files.
Thanks,
Glen

iMac, 3.06ghz Intel Core i3,4G RAM,500G HD, Mac OS X (10.6.5)

Posted on Dec 13, 2010 9:04 AM

Reply
13 replies

Jan 14, 2011 8:24 AM in response to Glen McCleary

John is correct that jpeg files cannot have transparency. A gif file can have a single color defined to be transparent, which is less than idea these days, since gif images are low quality (only 256 possible colors) and a single color of transparency does not allow for anti-aliased edges. A png has true transparency (an "alpha channel" as John says).

All that said, if you're planning to use the image as an icon, you're probably best to use an icon editor. There's one that is available free as part of the Mac developer tools. You can sign up for a free developer account on Apple's web site to download those tools.

Jan 14, 2011 8:23 AM in response to Glen McCleary

I think it depends on whether the source image has an alpha channel,

if not you'd have to edit the image and give it one (ie delete the white from around the image)

To my knowledge, PNG is the best format for this.

Looking at this, it would seem a JPEG can't have an Alpha channel (or transparency as you put it)

http://www.faqs.org/faqs/jpeg-faq/part1/section-12.html

Message was edited by: JohnAlanWoods

Jan 14, 2011 8:25 AM in response to Glen McCleary

You can simply do it with Preview as well.

To convert your jpg with Preview Save As--> .png

Open your new png image. Make sure the tool bar is open (pill button upper right corner.)
In that tool bar select --> *instant alpha* -->click and drag over background for alpha channel and delete. Save. Done.

You can then select all, copy, and paste on the get info panel icon.

Jan 14, 2011 8:25 AM in response to Glen McCleary

Glen McCleary wrote:
I thought the image I downloaded was a JPEG but maybe it was a GIF. Anyway, what is the best way to edit the image, for instance a PNG?


Thanks Leroy!!


Your welcome Glen McCleary - I just re-read your post and certainly works with .gif as well, same procedure.

Preview is quit a powerful editor. (it did lose some functionality from Leopard to Snow Leopard unfortunately.)

Don't get me wrong GIMP is awesome but you do not need to fire both barrels when a pea-shooter will get the job done. Economy of motion.

Good computing.

Jan 14, 2011 8:25 AM in response to Glen McCleary

Glen McCleary wrote:
Thanks again.....I downloaded a few PNG's etc and played with them in Preview, just had to get use to using the lasso accurately. It's always great learning new things on a Mac. (sometimes relearning...!)
Glen


The instant-alpha will work multiple times if are working your way around a image; save after all alpha channels established.

The lasso like you say a bit more cumbersome, but maybe the last resort.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I make transparent backgrounds for icons used in the Dock?

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