Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BadWolf13

macrumors 6502
Original poster
Dec 17, 2009
271
0
I'm trying to create an image to use as the image for a button in my app. The problem is, is that whenI set the button to this image file, it includes the background, creating a white square around the image. How do I get Interface Builder to recognize that the white in the image is the background, and should be transparent?
 
Wirelessly posted

The way you describe the image is that is does not have transparency. You need to create it and save it with a transparent background. That's the easy way.

The hard way is to deal with it in your app. You could copy the image into a new one with transparent bits and then turn those on via a custom filter where white appears. If your image has white areas that you want displayed as white then this isn't a good idea.
 
Wirelessly posted

The way you describe the image is that is does not have transparency. You need to create it and save it with a transparent background. That's the easy way.

How do I do that?
 
How do I do that?

Part of asking questions is giving enough information so that others can best help you. ScoobyMcDoo suggested one solution. Knowing what tool you are using to create the graphic might be helpful for other possible responses. Also, what graphics tools do you currently have access to also might be helpful.
 
The only graphic editing program I have is Paintbrush. I substituted gimp for paintbrush in ScoobyMcDoo's idea, and found a tutorial on how to do it with Paintbrush. Don't ask me why I didn't think of that before. Time for a Scooby snack.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.