Skip to content

Commit ae4ecb1

Browse files
committed
Use UIImagePNGRepresentation to preserve transparency
1 parent e5b05c3 commit ae4ecb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SDWebImage/SDImageCache.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ - (void)storeImage:(UIImage *)image imageData:(NSData *)imageData forKey:(NSStri
158158
if (image)
159159
{
160160
#if TARGET_OS_IPHONE
161-
data = UIImageJPEGRepresentation(image, (CGFloat)1.0);
161+
data = UIImagePNGRepresentation(image);
162162
#else
163163
data = [NSBitmapImageRep representationOfImageRepsInArray:image.representations usingType: NSJPEGFileType properties:nil];
164164
#endif

0 commit comments

Comments
 (0)