I have an UIImage with alpha channel.
How do I extract the RGB channels of a UIImage, each one to be an independent UIImage with alpha?
thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Like this.
Also, take a look at this question – third answer in paranoid detail
And some code for accessing the pixels and saving them into a new UIImage:
adapted from here. To have the three distinct channels in separate images, do like in the code, set to zero all but the channel that you want to save each time, and then create the new image.