Commit Graph

218 Commits

Author SHA1 Message Date
DreamPiggy 9ee3dac978 Renaming `SDWebImageFrame` -> `SDImageFrame`. `SDWebImageCoderHelper` -> `SDImageCoderHelper` 2018-04-26 23:04:20 +08:00
DreamPiggy e862ea1b8e Rename all `SDWebImageTransformer` to `SDImageTransformer` 2018-04-26 23:03:44 +08:00
DreamPiggy f81480189d Add modulemap files for SDWebImage to support modular framework, move the WebP & GIF into subdirectory to make Podspec works 2018-04-19 17:25:39 +08:00
Bogdan Poplauschi af0eaccbc5 Merge pull request #2292 from dreampiggy/refactor_cache_webcache_protocol
Fix the custom cache protocol naming
2018-04-19 10:39:39 +03:00
Bogdan Poplauschi eded5f026c Merge pull request #2293 from dreampiggy/refactor_naming_NSImge_category
Renaming the NSImage category naming to `NSImage+Compatibility`
2018-04-19 10:26:51 +03:00
DreamPiggy 7cf58ad7c5 Renaming the NSImage category naming to `NSImage+Compatibility`, because it's only used for Cross-platform compatibility code. `Additions` is too wide 2018-04-18 21:14:34 +08:00
DreamPiggy 57db312cc5 Add `SDWebImageLoader` protocol for custom image loader. Also introduce the `SDWebImageLoadersManager` to manage multiple loaders with priority 2018-04-18 20:26:14 +08:00
DreamPiggy a6bdba724e Fix all cache test 2018-04-18 19:24:23 +08:00
Bogdan Poplauschi 5426a720f7
Merge pull request #2278 from dreampiggy/refactor_cache_webcache_protocol
Refactor cache - Support custom web cache
2018-04-18 14:06:50 +03:00
DreamPiggy 9f770b6c19 Refactor to support custom image cache used for web manager. Supports caches manager with multiple caches and op policy 2018-04-18 14:40:56 +08:00
DreamPiggy 60d58ef977 Refactor all current custom error in SDWebImageErrorDomain with error code. Also using NS_ERROR_ENUM to provide better Swift API 2018-04-18 13:26:20 +08:00
Bogdan Poplauschi 1bc4662bde Merge pull request #2282 from dreampiggy/refactor_memory_cache_disk_cache
Refactor cache - Support custom memory cache & disk cache
2018-04-17 12:14:06 +03:00
DreamPiggy 62058d209d Add memory cache and disk cache protocol, make our image cache just like a wrapper to call the disk cache implementation 2018-04-17 11:09:56 +08:00
DreamPiggy 3d7896f663 Adopt the current cache key filter and cache serializer to support using in context options. Using a protocol based object store block instead block itself. 2018-04-14 18:18:45 +08:00
DreamPiggy 55256d0091 Use a protocol instance instead of block for request modifier. This can solve the problem that Swift user is hard to grab the block back stored in dictionary. 2018-04-07 15:56:34 +08:00
DreamPiggy c3892d7d08 Move all download settings into SDWebImageDownloaderConfig, make it more easy to use with clear API.
Deprecate `createNewSessionWithConfiguration`, which make downloader not sync with URLSession. If user need to specify sharedDownloader config, just modify the defaultDownloaderConfig instead.
2018-04-05 00:15:53 +08:00
DreamPiggy 082c5af565 Add APNG coder to support static PNG & APNG rendering. Also update macOS's SDAnimatedImageRep 2018-03-29 17:45:56 +08:00
DreamPiggy 87bbcdc46f Introduce SDAnimatedImage and SDAnimatedImageView for high performance animated image rendering on iOS & macOS 2018-03-25 17:23:12 +08:00
DreamPiggy 464d725368 Adopt the transformer to cache & manager. Use a new context option SDWebImageContextCustomTransformer to bind the transformer
Drop old way of delegate method for transformer. Add two new delegate methods to allow advanced use case after we remove that.
2018-03-17 21:18:19 +08:00
DreamPiggy 5ff999f3d1 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Bumped version to 4.3.3
  Add cacheKeyFilter to allow user provide modified version of data when storing the disk cache in SDWebImageManager

# Conflicts:
#	SDWebImage/SDWebImageManager.h
2018-03-13 00:04:35 +08:00
DreamPiggy dc5c974b89 Bumped version to 4.3.3
update CHANGELOG
2018-03-12 23:06:02 +08:00
DreamPiggy 3ba2fd8e6a Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Bumped version to 4.3.2
  Follow Apple's doc, add NSOperation only after all configuration done.
  Update the comments
  Fix that iOS 8 NSURLSessionTaskPriorityHigh symbol not defined in Foundation framework and cause crash
2018-02-28 12:54:43 +08:00
DreamPiggy 5147ae5c89 Bumped version to 4.3.2
update CHANGELOG
2018-02-28 12:05:42 +08:00
DreamPiggy a54f41204d Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Bumped version to 4.3.1
  update CHANGELOG
  Create a subclass of NSCache using a weak cache. Only remove the cache when memory warning and sync back the alive instance from weak cache into cache.

# Conflicts:
#	SDWebImage/SDImageCache.m
2018-02-26 12:58:22 +08:00
DreamPiggy 71caeb82e4 Bumped version to 4.3.1 2018-02-25 22:53:33 +08:00
DreamPiggy e7e3caae72 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Fix CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF warning
  Disable travis-ci email notification
  Fix prefetcher test to first clear the disk cache, and manager test to only fulfill the finished one
  Improve the travis-ci to not clean the build for dynamic framework to speed up the demo build
  Create a subclass of NSBitmapImageRep to fix the GIF frame duration issue on macOS
  Use lock instead of barrier queue to keep callbacks block thread-safe
  Decode the image in the operation level's queue instead of URLSession delegate queue. Because URLSession delegate queue is a barrier queue and shared between different operations
  Expose the read write to FLAnimatedImage associate to the UIImage to allow advanced feature like placeholder
  Fix that SDImageCacheQueryDataWhenInMemory should response cacheType to memory cache when the in-memory cache hit (#2218)
  Update the docs
  Improvement download operation for priority and some protect (#2208)
  Update the readme about macOS minimum deployment target version
  Fix the macOS wrong minimum deployment target version to 10.9. And also fix the warning on Xcode 9 by enable more warning options

# Conflicts:
#	SDWebImage.podspec
#	SDWebImage.xcodeproj/project.pbxproj
#	SDWebImage/SDImageCache.m
#	SDWebImage/SDWebImageDownloaderOperation.m
#	SDWebImage/SDWebImageFrame.h
2018-02-21 18:59:03 +08:00
DreamPiggy fc1fd0a74e Create a subclass of NSBitmapImageRep to fix the GIF frame duration issue on macOS 2018-02-18 17:52:13 +08:00
DreamPiggy e012b36679 Refactor the image indicator usage for UIView category. Use two protocol `SDWebImageIndicator` & `SDWebImageProgressIndicator` to make this more customizable. Implement two class about activity indicator and progress indicator for both UIKit/AppKit 2018-02-04 14:37:51 +08:00
DreamPiggy af282c1d5e Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Bumped version to 4.3.0
  update CHANGELOG
  Update the readme
  Update the readme and issue template
  Use a lock to ensure headers mutable dictionary thread-safe
  Do not hard-code cache policy. Use SDWebImageDownloaderUseNSURLCache to check
  Use the correct way to specify cancel if the response status code is invalid.
  Ensure all the session delegate completionHandler called. Fix the leak when response error code below iOS 10
  Fix the issue that prefetcher will cause stack overflow is the input urls list is huge because of recursion function call
  Update the comments for image transition
  Expose the associate FLAnimatedImage to user for advanced usage. Update the comments
2018-02-01 11:53:13 +08:00
DreamPiggy 406220bb52 Bumped version to 4.3.0
updated CHANGELOG
2018-02-01 11:23:34 +08:00
DreamPiggy f05a1bf96f Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Update the comments and a little enhancement for FLAnimatedImageView Category
  Use a dispatch semaphore to keep thread safe for downloader because it need the hold cancel and add procedure be thread-safe
  Add the current image/alternateImage url for NSButton category. A little code refactoring
  Update macOS demo to add a clear cache button using NSButton category
  Fix that reset alternateImage cancel the image load operation for NSButton+WebCache
  Add WebCache category for NSButton on macOS
  A little enhancement to avoid block capture the heap object
  Use a internal method to avoid thread-safe issue for file manager. Remove that checkIOQueue and add sync version exist API
  Add the image transition argument for all UIView+WebCache, make this easy for user to do some fade transition. It also reuse the current setImageBlock and make it easy to customize

# Conflicts:
#	SDWebImage.xcodeproj/project.pbxproj
#	SDWebImage/SDImageCache.h
#	SDWebImage/SDImageCache.m
#	SDWebImage/UIView+WebCache.h
#	SDWebImage/UIView+WebCache.m
#	WebImage/SDWebImage.h
2018-01-26 22:19:55 +08:00
DreamPiggy 8590388a6e Add WebCache category for NSButton on macOS 2018-01-25 16:40:40 +08:00
DreamPiggy eedc0ad20c Move the context option to a separate header to allow to be included without dependency, use String Enum to bridge for Swift 2018-01-23 13:48:47 +08:00
DreamPiggy 829d54ff03 Add the image transition argument for all UIView+WebCache, make this easy for user to do some fade transition. It also reuse the current setImageBlock and make it easy to customize 2018-01-23 11:58:22 +08:00
DreamPiggy b6e108a5b1 Rename `NSImage+WebCache` to `NSImage+Addtions`. Add helper methods, use property based API, which more suitable for Swift 2018-01-22 21:54:12 +08:00
DreamPiggy 9c124435b6 Move the imageLoopCount and isAnimated into UIImage+WebCache file, removed the outdated methods 2018-01-20 16:48:51 +08:00
DreamPiggy c5f3a8c007 Bumped version to 4.2.3 + updated CHANGELOG 2017-12-30 14:30:42 +08:00
Bogdan Poplauschi 0f73155d09 Bumped version to 4.2.2 + updated CHANGELOG 2017-11-07 09:21:55 +02:00
Bogdan Poplauschi b2e5317666 Bumped version to 4.2.1, updated CHANGELOG 2017-10-31 20:39:19 +02:00
DreamPiggy 19f45a3cf4 Feature refactor built-in coders and support animated webp on macOS (#2082)
* Refactor code. Move the C global function to a new SDWebImageCoderHelper class.

1. Create two method for animated image parse. Provide the way to allow animates on macOS
2. Create a new class called SDWebImageFrame to allow abstract usage for animated image
3. Fix EXIF orientation method will crash on iOS 7 because it’s a iOS 8 above API

* Change sd_imageLoopCount to retrieve GIF loop count for NSImage on macOS

* Adopt the refactor code, change our build-in coder with that coder helper method to reduce complexity

* Update the demo project on macOS to show animated WebP
2017-10-31 20:34:05 +02:00
Bogdan Poplauschi cd37ef672b Preparing for 4.2.0 release: bumped versions and updated the CHANGELOG 2017-10-23 20:35:34 +03: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
Bogdan Poplauschi c1df782869 Bumped version to 4.1.2 and added to changelog 2017-10-09 09:31:38 +03:00
Bogdan Poplauschi 93a386ed0f Bumped version to 4.1.1 + updated changelog 2017-10-06 21:57:54 +03:00
Bogdan Poplauschi 2d9c81295f Bumped version to 4.1.0, updated changeling 2017-07-31 16:08:03 +03:00
Bogdan Poplauschi d9f7cf417b Fixed #1776 Umbrella header warning for the FLAnimatedImage (while using Carthage) - replaces #1781 2017-07-31 14:19:02 +03:00
Bogdan Poplauschi 23a8be8800 Update to #1784 - Set CFBundleVersion to 4.0.0 (to match CFBundleShortVersionString - same as for AFNetworking) 2017-02-18 09:19:53 +02:00
Ivan Konov 941fde3279 Current Project Version set to 1 in order to have a default value for CFBundleVersion if set as in Info.plist files. In WebImage/Info.plist is set explicitly to 400. 2017-02-05 23:17:12 -08:00
Bogdan Poplauschi 1777032d03 Set version to 4.0.0 and updated CHANGELOG 2017-01-28 20:17:57 +02:00
Bogdan Poplauschi 5cccc2177b Bumped version to 4.0.0-beta2 2016-10-06 17:22:51 +03:00
Bogdan Poplauschi f1a19df721 Added SDImageCacheConfig.h and UIView+WebCache.h to the umbrella header 2016-09-30 09:33:06 +03:00
Bogdan Poplauschi 823b615281 Set 4.0.0-beta as the version from the podspec and the Info.plist file 2016-08-26 21:35:37 +03:00
Bogdan Poplauschi f5171b3ba8 Added tvOS demo 2016-06-13 01:13:46 +03:00
Bogdan Poplauschi 442b134206 OSX Example 2016-06-13 00:09:55 +03:00
Bogdan Poplauschi 4c6eb5e72e OSX compatibility and target. (NSImage+WebCache) for UIImage compatibility
Clarified and simplified the usage of TARGET_OS_* macros. Added SD_MAC, SD_UIKIT, SD_IOS, SD_TV, SD_WATCH.
Updated Travis CI
2016-06-12 23:23:53 +03:00
Bogdan Poplauschi bb0b84342f Merge branch 'master' into 4.x
# Conflicts:
#	SDWebImage/SDWebImageManager.m
2016-06-07 12:19:48 +03:00
Bogdan Poplauschi 67329ac512 Bumped the version 2016-06-07 11:57:03 +03:00
Bogdan Poplauschi 3364a981d5 Merge branch 'master' into 4.x
+ SDWebImageDownloader downloadImageWithURL:... properly use the weakself-strongself pattern

# Conflicts:
#	.travis.yml
#	Examples/SDWebImage Demo.xcodeproj/project.pbxproj
#	README.md
#	SDWebImage.xcodeproj/project.pbxproj
#	SDWebImage/SDWebImageDownloader.m
#	SDWebImage/SDWebImageDownloaderOperation.h
#	SDWebImage/SDWebImageDownloaderOperation.m
#	SDWebImage/SDWebImageManager.m
#	Tests/Podfile
#	Tests/SDWebImage Tests.xcodeproj/project.pbxproj
2016-06-07 08:36:45 +03:00
Bogdan Poplauschi 6545a3aba1 Bumped the deployment target to iOS 7 (due to NSURLSession) and also incremented the library version to 3.8.0 2016-06-02 19:10:31 +03:00
Bogdan Poplauschi 94c1ec3ed0 Revisited all copyright comments and decided for just one format 2016-06-01 15:53:08 +03:00
Bogdan Poplauschi e3ba4110a9 Renamed the schemes for consistency, dynamic frameworks are named SDWebImage instead of WebImage. Updated the Tests Podfile + project. Renamed the WebImage.h to SDWebImage.h to match the framework naming 2016-05-08 22:59:32 +03:00
Bogdan Poplauschi 990f85bce2 Bumped version to 3.7.6 2016-05-08 19:32:10 +03:00
Bogdan Poplauschi 64f621081c Bumped version to 3.7.5 and added to changelog 2016-01-21 16:34:36 +02:00
Bogdan Poplauschi a45b222e70 Bump version to 3.7.4 2016-01-08 17:17:58 +02:00
hoseking 07fe1f0dfe Update project settings for Xcode 7 2015-10-16 11:23:28 -07:00
hoseking 4068b93386 Add tvOS Framework target 2015-10-16 11:23:28 -07:00
Florian Buerger d107a80189 Add newline to avoid compiler warning 2015-06-29 11:48:49 +02:00
Florent Vilmart 9ee89474ed Adds support for iOS 8+ Framework and Carthage
Adds Instructions for Carthage installation
2015-03-15 12:06:27 -04:00