I have PNGs in Apple's iOS optimized BGRA PNG format (what I get using [OptimizedPNG](https://github.com/basuke/OptimizedPNG)) and want to draw them in a way that tells CoreGraphics NOT to ignore the alpha component of the image. I'm drawing to a `CGContextRef` in `drawRect:`

Edit: the rendered image shows black where it should be fully transparent (sometimes other random artifacts). The opaque areas are rendered normally.
`CGImageAlphaInfo` I get from the image is `kCGImageAlphaNoneSkipLast`, which *seems* to indicate there is a problem in the way the image is saved by OptimizedPNG. I think this should be `kCGImageAlphaPremultipliedLast`.

Perhaps the PNG chunks are wrong, but I don't see anything wrong with IHDR, and there is very little I can find about the CgBI chunk. 

This is how OptimizedPNG saves the color data:

```
// IDAT
int size = width*height*4;
unsigned char *buffer = malloc(size);
CGContextRef context = CGBitmapContextCreate(buffer, width, height, 8, width*4, CGImageGetColorSpace(originalImage.CGImage), kCGImageAlphaPremultipliedLast);
CGRect rect = CGRectMake(0.0, 0.0, (CGFloat)width, (CGFloat)height);
CGContextDrawImage(context, rect, originalImage.CGImage);
CGContextRelease(context);

int size_line = 1 + width*4;
int size_in = height*size_line;
unsigned char *buffer_in = malloc(size_in);
for(int y = 0; y < height; ++y){
    unsigned char *src = &buffer[y*width*4];
    unsigned char *dst = &buffer_in[y*size_line];
    *dst++ = 1;
    unsigned char r = 0, g = 0, b = 0, a = 0;
    for(int x = 0; x < width; ++x){
        dst[0] = src[2] - b;
        dst[1] = src[1] - g;
        dst[2] = src[0] - r;
        dst[3] = src[3] - a;
        r = src[0], g = src[1], b = src[2], a = src[3];
        src += 4;
        dst += 4;
    }
}

```