SDWebImage v5.7.0 Release Notes
Release Date: 2020-04-04 // about 4 years ago-
๐ Features
Cache
- โ Added the async version API to query disk image data only
- โ Added the sync API to query disk image with context and options, which matches the async version
Coder
- ๐ Feature supports encoding options like max file size, max pixel size, as well as background color when using JPEG for alpha image #2972
- ๐ You can use
.encodeMaxFileSize
to limit the desired lossy file size, better than compression quality - You can use
.encodeMaxPixelSize
to limit the pixel size, like thumbnail encoding
Transformer
- ๐จ Refactory the current thumbnail && transformer about cache key. Developer should have the API to calculate the cache key from thumbnail or transformer, not hard-coded. #2966
Context Option
- โ Added new query cache type support, including the SDImageCache API and context option #2968
- You use
.queryCacheType
to query image from memory/disk/both cache during image pipeline loading
๐ Fixes
- ๐ Fix the issue for Carthage/SwiftPM framework version symbols, this should match the framework name SDWebImage, or will get a link error when used #2971 #2969
- Simplify the xattr helper method's code with modern Objective-C syntax #2967. Thanks @huangboju
๐ Changes
- ๐ Change the behavior to return the abstract type for unknown image format, this can solve the accident issue for custom coder who provide a new format #2973