Heinrich gave you a good answer to this question. I just thought that I was proposing my specific case as an alternative to the answers of the tarmins. The problem with this answer is that it does not solve the problem if you want an alpha channel to be present. When I ran into this problem, I used
Trevor Harmon's UIImage + Alpha category. In the code, I found this comment:
// The bitsPerComponent and bitmapInfo values are hard-coded to prevent an "unsupported parameter combination" error
Now this hard-fix was in one of the methods that CGBitmapContextCreate , but not what followed. So for me it is just a question to follow the author’s own advice to fix the problem with one of his other methods;)
It is clear that some part of CGBitmapInfo does not receive the correct transfer from the image in question, although why I do not know.
Therefore, use these constants in bitmapInfo if you are working with an alpha channel: kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst
Otherwise, I would like to point out this really useful class if you are dealing with alias problems!
(It is also worth mentioning that this problem only appeared in Xcode 6 ....)
sinewave440hz
source share