CGBitmapContextCreate takes an parameter that's not very obvious to me:
For example, for a 32-bit pixel format and an RGB color space, you would specify a value of 8 bits per component.
I have created 24-bit PNG files with alphatransparency, and added them to Xcode. At compile time, Xcode optimizes those PNG tiles with pngcrunch.
So, when trying to make an graphics context out of such an image file on iPhone-OS, I need to specify the bits per component.
In this case, I would say they're 4 bits per component, although I dont know if alpha counts as an component.