PDA

View Full Version : Creating Images for Buttons




BadWolf13
May 31, 2012, 08:16 PM
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?



xStep
Jun 1, 2012, 12:44 PM
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.

BadWolf13
Jun 1, 2012, 01:49 PM
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?

ScoobyMcDoo
Jun 1, 2012, 03:03 PM
How do I do that?

I usually use the gimp to do that. If you google 'gimp transparent background', you should find multiple tutorials on how to accomplish this.

xStep
Jun 1, 2012, 03:56 PM
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.

BadWolf13
Jun 2, 2012, 12:59 AM
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.