Use UIImagePNGRepresentation to preserve transparency
This commit is contained in:
parent
e5b05c3109
commit
ae4ecb16f6
|
@ -158,7 +158,7 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
|
|||
if (image)
|
||||
{
|
||||
#if TARGET_OS_IPHONE
|
||||
data = UIImageJPEGRepresentation(image, (CGFloat)1.0);
|
||||
data = UIImagePNGRepresentation(image);
|
||||
#else
|
||||
data = [NSBitmapImageRep representationOfImageRepsInArray:image.representations usingType: NSJPEGFileType properties:nil];
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue