Authored by Olivier Poitrey

Fix alpha handling in image decoder (fix #204)

... ... @@ -104,8 +104,8 @@ static SDWebImageDecoder *sharedInstance;
alphaInfo != kCGImageAlphaNoneSkipFirst &&
alphaInfo != kCGImageAlphaNoneSkipLast);
int bytesPerPixel = imageHasAlphaInfo ? 4 : 3;
CGBitmapInfo bitmapInfo = imageHasAlphaInfo ? kCGImageAlphaPremultipliedLast : kCGImageAlphaNone;
int bytesPerPixel = alphaInfo != kCGImageAlphaNone ? 4 : 3;
CGBitmapInfo bitmapInfo = imageHasAlphaInfo ? kCGImageAlphaPremultipliedLast : alphaInfo;
CGContextRef context = CGBitmapContextCreate(NULL,
CGImageGetWidth(imageRef),
... ...