SDWebImage v5.14.1 Release Notes
Release Date: 2022-11-11 // over 2 years ago-
๐ See all tickets marked for the 5.14.1 release
๐ Fixes
- ๐ Fix the iOS 12 crash because the underlyingQueue is nil #3434 #3433
- ๐ Fix the missing lock for callbackTokens which may cause thread-safe issue #3439 #3438
- ๐ Use CoreGraphics to decode PDF instead of ImageIO to solve iOS 16's issue #3436
Previous changes from v5.14.0
-
๐ See all tickets marked for the 5.14.0 release
Behavior Changes
- ๐ Introduce
SDWebImageContextImageDecodeOptions
, deprecateSDImageCoderWebImageContext
#3421 - โก๏ธ - Note the deprecated
SDImageCoderWebImageContext
is no longer used. Update your codebase to useSDWebImageContextImageDecodeOptions
to pass extra information from manager to coder. Loaded image will also store the same information inimage.sd_decodeOptions
- ๐จ Refactor the hack when multiple different thumbnail image requests for same url called at the same time #3423
- - Now the SDWebImageDownloader can callback each thumbnail request for same url with the correct image size as well (previously can't)
- - Now if manager's callback image is thumbnail (
image.sd_isThumbnail == YES
), or transformed (image.sd_isTransformed == YES
), the callback data will be nil. This because the image does not match downloaded data actually. If you really need original full size data, query the disk cache again using the original key. You may needSDWebImageWaitStoreCache
options as well. (previously behavior is undefined, may callback with full size data, or encoded small size data, or even nil)
๐ Features
Coder
- ๐ Support use url.path or custom UTI hint passed to ImageIO, solve the TIFF/NEF/SRW raw image decoding with wrong size #3419
- - Note from 5.14.0, we may pass the file extension to coder as a UTI hint
- โ Added
SDImageCoderDecodeUseLazyDecoding
to control whether to use lazy-decoding for ImageIO #3425 - 0๏ธโฃ - Note from 5.14.0, by default we enable lazy decoding for static image coder, disable lazy decoding for animated image coder, suitable for most cases. If you want, pass
.decodeUseLazyDecoding = YES
to context option.imageDecodeOptions
๐ Performance
- โช Introduce new workaround to strip CGImage retained CGImageSource on iOS 15 #3425 #3387
- - Note this also fix the limitation that you can not use lazy-decoding for animated image on iOS 15+. Pass
.decodeUseLazyDecoding = YES
to context option.imageDecodeOptions
- ๐ Replace conformsToProtocol call with appropriate respondsToSelector check to improve performance #3429
- ๐ Fix del redundant autoreleasepool #3388
๐ Fixes
- Avoid store again when origin disk cache hit during Thumbnail or Transformer with smaller pixel size #3428 #3395
- โ Add the possible nullable logic check when the force-decode/copy failed #3427
- ๐ Introduce