Fix the issue the fallback logic of ImageIO Source should avoid passing any UTI hint
This commit is contained in:
parent
6c6b951845
commit
a80af99d0a
|
@ -409,7 +409,7 @@ static CGImageRef __nullable SDCGImageCreateCopy(CGImageRef cg_nullable image) {
|
|||
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
|
||||
if (!source) {
|
||||
// Try again without UTType hint, the call site from user may provide the wrong UTType
|
||||
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
|
||||
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, nil);
|
||||
}
|
||||
if (!source) {
|
||||
return nil;
|
||||
|
|
|
@ -202,7 +202,7 @@ static NSString * kSDCGImageDestinationRequestedFileSize = @"kCGImageDestination
|
|||
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
|
||||
if (!source) {
|
||||
// Try again without UTType hint, the call site from user may provide the wrong UTType
|
||||
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, (__bridge CFDictionaryRef)creatingOptions);
|
||||
source = CGImageSourceCreateWithData((__bridge CFDataRef)data, nil);
|
||||
}
|
||||
if (!source) {
|
||||
return nil;
|
||||
|
|
Loading…
Reference in New Issue