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;