MugunthKumar/MKNetworkKit — pull request #328 by WilliamZang (2013-05-01 09:38:09+00:00)
Title: decompressedResponseImageOfSize:completionHandler: have some bugs

## Creating the CGBitmapContext with the right bytes per pixel and bitmap info depending on the original image.

This removes an error that was making `CGBitmapContext` return NULL with some images:

> : CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 400 bytes/row.

Basically, depending on whether the original image has alpha info (its alphaInfo != kCGImageAlphaNone), I create a context with alpha info kCGImageAlphaPremultipliedLast (basically RGBA) or no alpha info at all (kCGImageAlphaNone)

From CGImage.h:

kCGImageAlphaNone, /* For example, RGB. */
kCGImageAlphaPremultipliedLast, /* For example, premultiplied RGBA */