-
- open the decoding/encoding procedures to the users - switch from hardcoded decoding/encoding to pluginable decoders/encoders (builtin + user created) - `SDWebImageCodersManager` is a singleton holding an array of `SDImageCoder` (protocol). Even though a singleton is not necesarily a good pattern, in this case it eliminates dealing with passing this array around - uses a priority queue behind scenes, which means the latest added coders have priority. - the priority is crucial when encoding/decoding something, we go through the list and ask each coder if they can handle the current data (see `canDecodeFromData:`, `canEncodeToFormat:`, `canIncrementallyDecodeFromData:`) - each coder must conform to this protocol `SDImageCoder` describing all the required behavior for a coder - we provide 3 built-in coders: `SDWebImageImageIOCoder` (for JPEG, PNG, TIFF), `SDWebImageGIFCoder` (for GIF), `SDWebImageWebPCoder` (for WebP and animated WebP) - the user of SDWebImage can create custom coders by conforming to `SDImageCoder` and adding the coders to `SDWebImageCodersManager`. See `addCoder:` or `removeCoder:` or `coders` getter to get the array - in order to preserve backwards compatibility, the UIImage categories were preserved, calling the new coders APIs described above
-
Fix unreachable code warning because of the return and break expression in #if SD_MAC
-
use NSImage built-in method to maintain GIF on macOS update README
-
Clarified and simplified the usage of TARGET_OS_* macros. Added SD_MAC, SD_UIKIT, SD_IOS, SD_TV, SD_WATCH. Updated Travis CI
-
…ork (pod lib lint works). There is an issue, the SDWebImage watchOS target doesn't show the simulator, only Generic Device. Also need to add some demo and test code.
-
# Conflicts: # SDWebImage.xcodeproj/project.pbxproj
-
…with a single animated frame (basically a static image). We do set it in the images array so we can distinguish between those and real static images. Dropped all other GIF code.
-
Don’t add nil to the array, just skip the frame.
-
…ix (deprecated the old ones) -there were a few exceptions where I just renamed the methods since they were added in this method
-
Remove GIF specific code from main source, isolate it in a UIImage category to ease future addition of format support