Minor check the logic that UTI has high priority than path extension

This commit is contained in:
DreamPiggy 2022-10-31 23:41:46 +08:00
parent e3c6cfa066
commit 279f636ac5
1 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,11 @@ SDImageCoderOptions * _Nonnull SDGetDecodeOptionsFromContext(SDWebImageContext *
thumbnailSizeValue = context[SDWebImageContextImageThumbnailPixelSize];
}
NSString *typeIdentifierHint = context[SDWebImageContextImageTypeIdentifierHint];
NSString *fileExtensionHint = cacheKey.pathExtension; // without dot
NSString *fileExtensionHint;
if (!typeIdentifierHint) {
// UTI has high priority
fileExtensionHint = cacheKey.pathExtension; // without dot
}
// First check if user provided decode options
SDImageCoderMutableOptions *mutableCoderOptions;