From 1a360b6faf022c98bb8139b31e434360fe788208 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Sat, 3 Nov 2012 21:21:45 +0100 Subject: [PATCH] Revert "Fixed Alpha chanel detection when decoding images." This reverts commit e6ede1104cea39f2034ec5a1644e2d2082cc57bd. --- SDWebImage/SDWebImageDecoder.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SDWebImage/SDWebImageDecoder.m b/SDWebImage/SDWebImageDecoder.m index 06b6e2d9..31b0cb29 100644 --- a/SDWebImage/SDWebImageDecoder.m +++ b/SDWebImage/SDWebImageDecoder.m @@ -100,9 +100,7 @@ static SDWebImageDecoder *sharedInstance; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGImageAlphaInfo alphaInfo = CGImageGetAlphaInfo(imageRef); - BOOL imageHasAlphaInfo = (alphaInfo != kCGImageAlphaNone && - alphaInfo != kCGImageAlphaNoneSkipFirst && - alphaInfo != kCGImageAlphaNoneSkipLast); + BOOL imageHasAlphaInfo = (alphaInfo != kCGImageAlphaNone); int bytesPerPixel = imageHasAlphaInfo ? 4 : 3; CGBitmapInfo bitmapInfo = imageHasAlphaInfo ? kCGImageAlphaPremultipliedLast : kCGImageAlphaNone;