Fix alpha handling in image decoder (fix #204)
This commit is contained in:
parent
c609027314
commit
048bdbb751
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue