Merge pull request #552 from garnett/master

Use UIImagePNGRepresentation to preserve transparency (fix for #545)
This commit is contained in:
Olivier Poitrey 2013-11-08 22:37:53 -08:00
commit 8b63e9ac06
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