AFNetworking/AFNetworking — pull request #1708 by robertmryan (2013-12-23 17:28:53+00:00)
Title: A couple of changes to `AFInflatedImageFromResponseWithDataAtScale`:

In my diagnosis of [issue 1706](https://github.com/AFNetworking/AFNetworking/issues/1706), I noticed a couple of issues with `AFInflatedImageFromResponseWithDataAtScale`:

1. `CGImageCreateWithJPEGDataProvider` does not properly handle CMYK images, so if CMYK image, fall back to `AFImageWithDataAtScale`, which handles CMYK JPEG images properly.

2. `CGBitmapContextCreate` does not handle 16 or 32 npc images properly (or at least it generates warning), so abort inflate process if more than 8 bpc.

3. Simplify the invocation of `CGDataProviderRelease` so we only have it in one place.

4. Previous incarnation of `AFInflatedImageFromResponseWithDataAtScale` could, in some circumstances, make redundant calls to `AFImageWithDataAtScale`, so tweaked the logic to remove these redundant calls.

5. This routine was manipulating the alpha settings in `bitmapInfo` if the colorspace had three components. Technically, because there are other colorspaces with three components (e.g. Lab), it’s probably more prudent to check to see if the colorspace is RGB.