Fixes a bug where image scale & orientation are ignored when decoding / decompressing an image.

This commit is contained in:
Shayan Yousefizadeh 2015-11-17 18:24:48 +00:00
parent 30e9e0b516
commit 95468315fc
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@
// Draw the image into the context and retrieve the new image, which will now have an alpha layer
CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
CGImageRef imageRefWithAlpha = CGBitmapContextCreateImage(context);
UIImage *imageWithAlpha = [UIImage imageWithCGImage:imageRefWithAlpha];
UIImage *imageWithAlpha = [UIImage imageWithCGImage:imageRefWithAlpha scale:image.scale orientation:image.imageOrientation];
if (unsupportedColorSpace)
CGColorSpaceRelease(colorspaceRef);