Răsfoiți Sursa

Merge pull request #1367 from Shayanzadeh/master

Fixes a bug where image scale & orientation are ignored when decoding / decompressing an image.
Konstantinos K 10 ani în urmă
părinte
comite
740cd7f090
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      SDWebImage/SDWebImageDecoder.m

+ 1 - 1
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);