Skip to content

Commit a80af99

Browse files
committed
Fix the issue the fallback logic of ImageIO Source should avoid passing any UTI hint
1 parent 6c6b951 commit a80af99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SDWebImage/Core/SDImageIOAnimatedCoder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ - (UIImage *)decodedImageWithData:(NSData *)data options:(nullable SDImageCoderO
409409
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
410410
if (!source) {
411411
// Try again without UTType hint, the call site from user may provide the wrong UTType
412-
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
412+
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, nil);
413413
}
414414
if (!source) {
415415
return nil;

SDWebImage/Core/SDImageIOCoder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ - (UIImage *)decodedImageWithData:(NSData *)data options:(nullable SDImageCoderO
202202
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
203203
if (!source) {
204204
// Try again without UTType hint, the call site from user may provide the wrong UTType
205-
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
205+
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, nil);
206206
}
207207
if (!source) {
208208
return nil;

0 commit comments

Comments
 (0)