Skip to content

Commit 1a3ccc2

Browse files
committed
Merge pull request SDWebImage#840 from foxling/master
fix SDWebImage#610 display progressive jpeg issue
2 parents 125515d + b2909fb commit 1a3ccc2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

SDWebImage/SDWebImageDownloaderOperation.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
228228
const NSInteger totalSize = self.imageData.length;
229229

230230
// Update the data source, we must pass ALL the data, not just the new bytes
231-
CGImageSourceRef imageSource = CGImageSourceCreateIncremental(NULL);
232-
CGImageSourceUpdateData(imageSource, (__bridge CFDataRef)self.imageData, totalSize == self.expectedSize);
231+
CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)self.imageData, NULL);
233232

234233
if (width + height == 0) {
235234
CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL);

0 commit comments

Comments
 (0)