Masking UIImages (yes, again)
Masking UIImages (yes, again)
- Subject: Masking UIImages (yes, again)
- From: James Miller <email@hidden>
- Date: Sun, 26 Jun 2011 16:06:30 -0600
I've been reading and experimenting and browsing and reading and experimenting but mostly failing miserably here and I need to ask the hive mind for some assistance.
In a nutshell, I'm just trying to take a range of white colors out of a UIImage and make those colors transparent. From what I've read, I shouldn't use PNGs with an alpha already defined, but I also shouldn't use JPGs because they don't have an alpha channel.
So I've been trying to the extract the UIImage's CGImage and then convert it from RGB to RGBA and THEN mask it with CGImageCreateWithMaskingColors with no success (transparent areas appear as black). I've tried various techniques involving CGBitmapContextCreate and CGImageCreate but with no luck.
This can't POSSIBLY be as complicated as I'm making this out to be! Can someone please show me how to do this properly!?
A thousand thank yous and a pet herring named after you!
--James
"The world is divided into people who do things and people who get the credit. Try, if you can, to belong to the first class. There's far less competition."
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden