|
@@ -28,7 +28,7 @@ FOUNDATION_EXPORT CGFloat SDImageScaleFactorForKey(NSString * _Nullable key);
|
|
|
/**
|
|
|
Scale the image with the scale factor for the specify key. If no need to scale, return the original image.
|
|
|
This works for `UIImage`(UIKit) or `NSImage`(AppKit). And this function also preserve the associated value in `UIImage+Metadata.h`.
|
|
|
- @note This is actually a convenience function, which firstlly call `SDImageScaleFactorForKey` and then call `SDScaledImageForScaleFactor`, kept for backward compatibility.
|
|
|
+ @note This is actually a convenience function, which firstly call `SDImageScaleFactorForKey` and then call `SDScaledImageForScaleFactor`, kept for backward compatibility.
|
|
|
|
|
|
@param key The image cache key
|
|
|
@param image The image
|
|
@@ -160,7 +160,8 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
|
|
|
SDWebImageFromLoaderOnly = 1 << 16,
|
|
|
|
|
|
/**
|
|
|
- * By default, when you use `SDWebImageTransition` to do some view transition after the image load finished, this transition is only applied for image download from the network. This mask can force to apply view transition for memory and disk cache as well.
|
|
|
+ * By default, when you use `SDWebImageTransition` to do some view transition after the image load finished, this transition is only applied for image when the callback from manager is asynchronous (from network, or disk cache query)
|
|
|
+ * This mask can force to apply view transition for any cases, like memory cache query, or sync disk cache query.
|
|
|
*/
|
|
|
SDWebImageForceTransition = 1 << 17,
|
|
|
|
|
@@ -171,7 +172,7 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
|
|
|
SDWebImageAvoidDecodeImage = 1 << 18,
|
|
|
|
|
|
/**
|
|
|
- * By default, we decode the animated image. This flag can force decode the first frame only and produece the static image.
|
|
|
+ * By default, we decode the animated image. This flag can force decode the first frame only and produce the static image.
|
|
|
*/
|
|
|
SDWebImageDecodeFirstFrameOnly = 1 << 19,
|
|
|
|
|
@@ -190,7 +191,7 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
|
|
|
|
|
|
/**
|
|
|
* By default, when we load the image from network, the image will be written to the cache (memory and disk, controlled by your `storeCacheType` context option)
|
|
|
- * This maybe an asynchronously operation and the final `SDInternalCompletionBlock` callback does not gurantee the disk cache written is finished and may cause logic error. (For example, you modify the disk data just in completion block, however, the disk cache is not ready)
|
|
|
+ * This maybe an asynchronously operation and the final `SDInternalCompletionBlock` callback does not guarantee the disk cache written is finished and may cause logic error. (For example, you modify the disk data just in completion block, however, the disk cache is not ready)
|
|
|
* If you need to process with the disk cache in the completion block, you should use this option to ensure the disk cache already been written when callback.
|
|
|
* Note if you use this when using the custom cache serializer, or using the transformer, we will also wait until the output image data written is finished.
|
|
|
*/
|
|
@@ -200,7 +201,7 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
|
|
|
* We usually don't apply transform on vector images, because vector images supports dynamically changing to any size, rasterize to a fixed size will loss details. To modify vector images, you can process the vector data at runtime (such as modifying PDF tag / SVG element).
|
|
|
* Use this flag to transform them anyway.
|
|
|
*/
|
|
|
- SDWebImageTransformVectorImage = 1 << 23,
|
|
|
+ SDWebImageTransformVectorImage = 1 << 23
|
|
|
};
|
|
|
|
|
|
|
|
@@ -213,24 +214,24 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSetIma
|
|
|
|
|
|
/**
|
|
|
A SDWebImageManager instance to control the image download and cache process using in UIImageView+WebCache category and likes. If not provided, use the shared manager (SDWebImageManager *)
|
|
|
- @deprecated Deprecated in the future. This context options can be replaced by other context option control like `.imageCache`, `.imageLoader`, `.imageTransofmer` (See below), which already matches all the properties in SDWebImageManager.
|
|
|
+ @deprecated Deprecated in the future. This context options can be replaced by other context option control like `.imageCache`, `.imageLoader`, `.imageTransformer` (See below), which already matches all the properties in SDWebImageManager.
|
|
|
*/
|
|
|
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextCustomManager API_DEPRECATED("Use individual context option like .imageCache, .imageLoader and .imageTransformer instead", macos(10.10, API_TO_BE_DEPRECATED), ios(8.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED));
|
|
|
|
|
|
/**
|
|
|
- A id<SDImageCache> instance which conforms to `SDImageCache` protocol. It's used to override the image mananger's cache during the image loading pipeline.
|
|
|
+ A id<SDImageCache> instance which conforms to `SDImageCache` protocol. It's used to override the image manager's cache during the image loading pipeline.
|
|
|
In other word, if you just want to specify a custom cache during image loading, you don't need to re-create a dummy SDWebImageManager instance with the cache. If not provided, use the image manager's cache (id<SDImageCache>)
|
|
|
*/
|
|
|
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImageCache;
|
|
|
|
|
|
/**
|
|
|
- A id<SDImageLoader> instance which conforms to `SDImageLoader` protocol. It's used to override the image mananger's loader during the image loading pipeline.
|
|
|
+ A id<SDImageLoader> instance which conforms to `SDImageLoader` protocol. It's used to override the image manager's loader during the image loading pipeline.
|
|
|
In other word, if you just want to specify a custom loader during image loading, you don't need to re-create a dummy SDWebImageManager instance with the loader. If not provided, use the image manager's cache (id<SDImageLoader>)
|
|
|
*/
|
|
|
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImageLoader;
|
|
|
|
|
|
/**
|
|
|
- A id<SDImageCoder> instance which conforms to `SDImageCoder` protocol. It's used to override the default image codre for image decoding(including progressive) and encoding during the image loading process.
|
|
|
+ A id<SDImageCoder> instance which conforms to `SDImageCoder` protocol. It's used to override the default image coder for image decoding(including progressive) and encoding during the image loading process.
|
|
|
If you use this context option, we will not always use `SDImageCodersManager.shared` to loop through all registered coders and find the suitable one. Instead, we will arbitrarily use the exact provided coder without extra checking (We may not call `canDecodeFromData:`).
|
|
|
@note This is only useful for cases which you can ensure the loading url matches your coder, or you find it's too hard to write a common coder which can used for generic usage. This will bind the loading url with the coder logic, which is not always a good design, but possible. (id<SDImageCache>)
|
|
|
*/
|