Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Icon Masks

Icon Masks
Thread Tools
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Nov 12, 2000, 03:30 PM
 
Hello ...

How can I create an icon mask for a button in a Cocoa/ObjC application?


Regards,

DayLateDon
     
Senior User
Join Date: Dec 1999
Location: Bar Harbor
Status: Offline
Reply With Quote
Nov 13, 2000, 07:01 AM
 
The Mac OS X Developer Tools (either from the CD you got, or the ADC website) include an Icon Composer app.

The easiest way to use this app is to create a PhotoShop image (including transparency if you want) and the Icon Composer app will import the .psd file and create the mask for you.

------------------
I'm cookoo for Cocoa Apps!
I'm cookoo for Cocoa Apps!
     
ali
Forum Regular
Join Date: Sep 2000
Status: Offline
Reply With Quote
Nov 13, 2000, 03:04 PM
 
IconComposer is for creating .icns files, which are used as application and document icons. However, they are not general purpose enough for use as images in buttons and such.

Your best bet for images with transparency for buttons is to have TIFF files with alpha channels. I believe Photoshop can create these.

One thing to note is that by default the TIFF files from Photoshop are not properly premultiplied. Cocoa compensates for this when loading the files in, but because there's a slight performance hit, it will warn you (in the console). You can "fix" such TIFF files by using the command line tool "tiffutil"; just read the file and save it again.

Ali
     
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Nov 14, 2000, 04:56 AM
 
Thanks for the information.

I don't have PhotoShop[*] , but I've discovered that Graphic Converter features alpha channels so I'm tinkering with that.

Thanks again ...
[*] Frankly, I find it a little off-putting that something as cumbersome and expensive as PhotoShop now seems the defacto entry-level editor for even the simplest of images. ClarisWorks worked just fine for me for years (the oddness of v6.0 notwithstanding).
     
ali
Forum Regular
Join Date: Sep 2000
Status: Offline
Reply With Quote
Nov 14, 2000, 05:14 PM
 
Frankly, I find it a little off-putting that something as cumbersome and expensive as PhotoShop now seems the defacto entry-level editor for even the simplest of images. ClarisWorks worked just fine for me for years (the oddness of v6.0 notwithstanding).
Would be nice if a small icon editor came with the developer tools, but in the meantime this can be considered a freeware, shareware, or small third-party opportunity. The TIFF with alpha format is not proprietary, and NSBitmapImageRep/NSImage classes in Cocoa have functionality to deal with them. So it's a question of how fancy of a wrapper you want to put around this --- possibilities range from a full-featured bitmap editor to something that takes existing images (say the image, and a separate mask) and plunks them together (a la IconComposer).

Ali



[This message has been edited by ali (edited 11-14-2000).]
     
Dedicated MacNNer
Join Date: Oct 1999
Status: Offline
Reply With Quote
Nov 15, 2000, 05:16 AM
 
Icon Builder Pro for MacOS is the only .icns editor app which I find is half decent.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2