From 95468315fc2892e3878a08c8f130276b47b2d408 Mon Sep 17 00:00:00 2001 From: Shayan Yousefizadeh Date: Tue, 17 Nov 2015 18:24:48 +0000 Subject: [PATCH] Fixes a bug where image scale & orientation are ignored when decoding / decompressing an image. --- SDWebImage/SDWebImageDecoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageDecoder.m b/SDWebImage/SDWebImageDecoder.m index 22b7727e..b78217ac 100644 --- a/SDWebImage/SDWebImageDecoder.m +++ b/SDWebImage/SDWebImageDecoder.m @@ -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);