0

I've been stuggling over this for a few hours, to no avail.

I have a PNG of a black shape on a transparent background. I want to fill the black part of the image with another color, and leave the transparent background to be transparent.

How can I do this?

Malloc
  • 15,434
  • 34
  • 105
  • 192
Andrew
  • 15,935
  • 28
  • 121
  • 203
  • how many different colors? Just one? Use another PNG and swap at run time. If you want to use many many colors, you will need to create an image mask using Cocos2D or CoreGraphics. – QED Apr 12 '13 at 13:40
  • Yeah, I'm going to want to use many colors. How can i do this? – Andrew Apr 12 '13 at 13:42
  • Check out the answer reference that Black Frog posted. Good question, but voting to close. – QED Apr 12 '13 at 13:43
  • Also [How to change the color of an UIImage](http://stackoverflow.com/questions/10755576/how-to-change-the-color-of-an-uiimage) could answer your question. – Black Frog Apr 12 '13 at 13:44
  • Perhaps the changing the blending mode could do what you want. https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211-BCIGICEF – Cory Powers Apr 12 '13 at 14:54

0 Answers0