Commit Graph

1552 Commits

Author SHA1 Message Date
Bogdan Poplauschi 81c7108706 Merge pull request #2064 from dreampiggy/feature_gif_category_support_animate_again
Give back our GIF category animation support since we now use plugin coders
2017-10-18 12:03:21 +03:00
Bogdan Poplauschi a32ab28acb Comment updates 2017-10-18 12:01:26 +03:00
walkline 879ea189a4 My IDE loves extra spaces 🙈 2017-10-17 22:52:01 +03:00
walkline 1644d71e7f Fixes fail condition in storeImageDataToDisk. Removes extra spaces. 2017-10-17 22:49:30 +03:00
DreamPiggy 17386829c1 Give back our GIF category animation support since we now use plugin coders. This will not affect FLAnimatedImageView which just create the first frame.
1. Change default coders to [IOCoder, WebPCoder]
2. Add back our previous GIF decoding code, with loop count support
3. Add GIF encoding code for animation
4. Modify IOCoder for GIF format because FLAnimatedImageView need just use the first frame
2017-10-18 02:25:05 +08:00
Bogdan Poplauschi d12484a762 Updated diagrams per latest master change 2017-10-17 18:40:01 +03:00
Bogdan Poplauschi bd8d01aa30 Let's try building with Xcode 9 2017-10-17 17:52:55 +03:00
Bogdan Poplauschi 5c33c10617 Merge pull request #1991 from dreampiggy/feature_refactor_decoding_with_plugin
Feature: refactor decoding code and provide decoding plugin
2017-10-17 17:38:50 +03:00
Stanislas Chevallier 69fe979266 Fixed cached image filename generated with invalid path extensions 2017-10-17 09:29:35 +02:00
DreamPiggy a0879fc049 Feature: refactor decoding code and provide decoding plugin
- 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
2017-10-16 19:52:18 +03:00
DreamPiggy e1603e1800 Allow user to provide reading options such as mapped file to improve performance in SDImageCache disk cache 2017-10-14 13:54:21 +08:00
walkline b51e0ca689 Removing not needed functions in SDImageCache. Using DI with initializer. 2017-10-11 21:11:36 +03:00
walkline 5fbbf73986 Merge branch 'master' of github.com:rs/SDWebImage 2017-10-11 20:16:06 +03:00
Bogdan Poplauschi c1df782869 Bumped version to 4.1.2 and added to changelog 2017-10-09 09:31:38 +03:00
Bogdan Poplauschi 322070e2c4 Merge pull request #2051 from dreampiggy/fix_progressive_totalsize_protect
Change finished check from equal to equal or greater than to protect …
2017-10-09 09:16:10 +03:00
Bogdan Poplauschi 25837a32e4 Merge pull request #2050 from dreampiggy/performance_webp
Static WebP decoding a little enhancement. Do not need create WebP it…
2017-10-09 09:10:35 +03:00
DreamPiggy 9fef316dfa Change finished check from equal to equal or greater than to protect accident condition 2017-10-09 12:48:29 +08:00
DreamPiggy 756e59a995 Static WebP decoding a little enhancement. Do not need create WebP iterator for static images. 2017-10-09 11:47:02 +08:00
Bogdan Poplauschi e59d34fdb7 Merge pull request #2049 from dreampiggy/fix_operation_not_call_done
Fix SDWebImageDownloaderOperation not call done when use SDWebImageDownloaderIgnoreCachedResponse
2017-10-08 19:49:33 +03:00
DreamPiggy 4991cb3038 Fix web format check not use immutable image data 2017-10-08 14:15:42 +08:00
DreamPiggy 624aa1e258 Fix SDWebImageDownloaderIgnoreCachedResponse early return without call done method 2017-10-08 14:13:14 +08:00
Bogdan Poplauschi 93a386ed0f Bumped version to 4.1.1 + updated changelog 2017-10-06 21:57:54 +03:00
Bogdan Poplauschi ff0690547d Xcode 9 recommended settings applied 2017-10-06 20:58:44 +03:00
Bogdan Poplauschi 4258154c2d Merge pull request #1983 from dreampiggy/fix_webp_import_issue
Fix SDWebImage v4 can not import libwebp framework's header files.
2017-10-06 20:52:12 +03:00
Bogdan Poplauschi 50e26dc5f7 Merge pull request #2032 from dreampiggy/adopt_refresh_cache_behavior
Adopt the previous version behavior about SDWebImageDownloaderIgnoreC…
2017-10-06 20:43:34 +03:00
DreamPiggy 3bb12e8956 Fix #1941 by placing a lock to avoid multi-thread issue for SDWebImageCombinedOperation cancelBlock 2017-10-06 16:58:42 +08:00
DreamPiggy 44e80816f0 Fix SDWebImage v4 can not import libwebp framework's header files.
Fix FLAnimatedImageView mixed local and global import
2017-10-06 12:27:24 +08:00
DreamPiggy 7491510f7e Adopt the previous version behavior about SDWebImageDownloaderIgnoreCachedResponse and SDWebImageRefreshCached without hack code 2017-10-06 12:13:31 +08:00
DreamPiggy 52993c7150 Merge pull request #2040 from dreampiggy/Fix_progressive_download_gray_background
Use CGImageSourceCreateIncremental to perform progressive decoding in…
2017-09-29 23:25:53 -05:00
DreamPiggy 91aef6442c Remove unused Image IO header 2017-09-30 12:03:57 +08:00
DreamPiggy 05fea33dac Merge pull request #2043 from dreampiggy/set_uibutton_placeholder_if_url_is_nil
Set UIButton's placeholer-image even if the url is nil
2017-09-29 12:21:38 -05:00
DreamPiggy 3ab924b016 Set UIButton's placeholer-image even if the url is nil 2017-09-29 23:40:43 +08:00
DreamPiggy 250e1fc87f Merge pull request #1985 from dreampiggy/performance_webp_decoding_optimize
Performance enhancement related to single WebP and animated WebP decoding...
2017-09-29 12:01:18 +08:00
DreamPiggy facdc9925b Use CGImageSourceCreateIncremental to perform progressive decoding instead of decode partial data each time from the beginning to improve performance and remove that gray background 2017-09-29 11:54:26 +08:00
DreamPiggy df099ced20 Performance enhancement related to single WebP image and animated WebP decoding
1. Change the code to not decode WebP images created in SD because it has been decoded
2. Add @autoreleasepool for animated WebP decoding do-while loop to reduce memory peak
2017-09-29 11:04:28 +08:00
DreamPiggy cd1158055a Merge pull request #2011 from dreampiggy/Fix_downloadOperation_imagedata_crash
Fix SDWebImageDownloadOperation imageData multi-thread issue.
2017-09-28 14:05:46 +08:00
DreamPiggy d36a664ef8 Merge pull request #2035 from dreampiggy/fix_macos_demo_deployment_target
Update macOS Demo deployment target to 10.10 to support build on Xcode 9
2017-09-26 14:49:22 +08:00
DreamPiggy a33d8dd7e0 Update macOS Demo deployment target to 10.10 to support build on Xcode 9 2017-09-26 13:56:35 +08:00
DreamPiggy 266b9be6a7 Merge pull request #2031 from dreampiggy/add_refresh_cache_test
Add a test for SDWebImageRefreshCached
2017-09-24 11:02:27 +08:00
DreamPiggy 74566aeb98 Add a test for SDWebImageRefreshCached 2017-09-23 20:34:08 +08:00
DreamPiggy 207677a6a4 Update ManualInstallation.md (#2030)
Fix `Other Linker Flags` images
2017-09-23 19:14:19 +08:00
DreamPiggy f5570320ed Merge pull request #2027 from dreampiggy/fix_test_prototype_warning
Fix clang strict prototype warning in test
2017-09-21 10:44:30 +08:00
DreamPiggy 446c33f14f Merge pull request #1994 from bpoplauschi/fix_request_cache_policy
Fix request cache policy
2017-09-21 10:42:24 +08:00
DreamPiggy 05dfa6c588 Fix clang strict prototype warning in test 2017-09-21 10:15:30 +08:00
walkline b9c17dcdd0 Merge branch 'master' of github.com:rs/SDWebImage
# Conflicts:
#	Tests/SDWebImage Tests.xcodeproj/project.pbxproj
2017-09-09 14:57:58 +03:00
DreamPiggy 9021e5b002 Change access the imageData in NSURLSession delegate queue to solve non thread-safe issue. Also, ensure imageData in completion block is immutable to avoid accident modification from the other queue 2017-08-31 21:04:17 +08:00
Bogdan Poplauschi e4ab5ebce2 Merge pull request #2002 from iwill/master
Fix issue #2001, add sd_currentBackgroundImageURL and sd_backgroundIm…
2017-08-18 21:54:35 +03:00
iwill de897ae33a Fix issue #2001 2017-08-18 13:55:34 +08:00
iwill 80dace4a4a Fix issue #2001, add sd_currentBackgroundImageURL and sd_backgroundImageURLForState: for UIButton 2017-08-18 12:02:06 +08:00
Bogdan Poplauschi 94cdb773d7 Merge pull request #1995 from DwayneCoussement/strict-prototype
CLANG_WARN_STRICT_PROTOTYPES: Yes please!
2017-08-15 10:55:40 +03:00