Use UIImagePNGRepresentation to preserve transparency

This commit is contained in:
Denis Lebedev 2013-11-04 14:36:34 +03:00
parent e5b05c3109
commit ae4ecb16f6
1 changed files with 1 additions and 1 deletions

View File

@ -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