Merge pull request #242 from pinterest/AHBlendMode

Use kCGBlendModeCopy when Decoding Images
This commit is contained in:
appleguy
2016-09-08 21:37:08 -07:00
committed by GitHub

View File

@@ -150,6 +150,7 @@ NSData * __nullable PINImagePNGRepresentation(PINImage * __nonnull image) {
PINImage *decodedImage = nil;
if (ctx) {
CGContextSetBlendMode(ctx, kCGBlendModeCopy);
CGContextDrawImage(ctx, CGRectMake(0, 0, imageSize.width, imageSize.height), imageRef);
CGImageRef newImage = CGBitmapContextCreateImage(ctx);