Authored by DreamPiggy

Remove the duplicated process to force decode (draw on bitmap context) in Image/…

…IO's progressive decoding.
@@ -152,25 +152,6 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over @@ -152,25 +152,6 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
152 // Create the image 152 // Create the image
153 CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(_imageSource, 0, NULL); 153 CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(_imageSource, 0, NULL);
154 154
155 -#if SD_UIKIT || SD_WATCH  
156 - // Workaround for iOS anamorphic image  
157 - if (partialImageRef) {  
158 - const size_t partialHeight = CGImageGetHeight(partialImageRef);  
159 - CGColorSpaceRef colorSpace = SDCGColorSpaceGetDeviceRGB();  
160 - CGContextRef bmContext = CGBitmapContextCreate(NULL, _width, _height, 8, 0, colorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst);  
161 - if (bmContext) {  
162 - CGContextDrawImage(bmContext, (CGRect){.origin.x = 0.0f, .origin.y = 0.0f, .size.width = _width, .size.height = partialHeight}, partialImageRef);  
163 - CGImageRelease(partialImageRef);  
164 - partialImageRef = CGBitmapContextCreateImage(bmContext);  
165 - CGContextRelease(bmContext);  
166 - }  
167 - else {  
168 - CGImageRelease(partialImageRef);  
169 - partialImageRef = nil;  
170 - }  
171 - }  
172 -#endif  
173 -  
174 if (partialImageRef) { 155 if (partialImageRef) {
175 #if SD_UIKIT || SD_WATCH 156 #if SD_UIKIT || SD_WATCH
176 image = [[UIImage alloc] initWithCGImage:partialImageRef scale:1 orientation:_orientation]; 157 image = [[UIImage alloc] initWithCGImage:partialImageRef scale:1 orientation:_orientation];