Quellcode durchsuchen

fix potential image encode error in iOS6.

ibireme vor 9 Jahren
Ursprung
Commit
84501d3495
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      YYImage/YYImageCoder.m

+ 1 - 1
YYImage/YYImageCoder.m

@@ -822,7 +822,7 @@ static BOOL YYCGImageDecodeToBitmapBufferWith32BitFormat(CGImageRef srcImage, vI
     } else {
         contextBitmapInfo |= alphaFirst ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaPremultipliedLast;
     }
-    CGContextRef context = CGBitmapContextCreate(NULL, width, height, 8, 32, YYCGColorSpaceGetDeviceRGB(), contextBitmapInfo);
+    CGContextRef context = CGBitmapContextCreate(NULL, width, height, 8, 0, YYCGColorSpaceGetDeviceRGB(), contextBitmapInfo);
     if (!context) goto fail;
     
     CGContextDrawImage(context, CGRectMake(0, 0, width, height), srcImage); // decode and convert