| | |
| | | /** |
| | | A transformer protocol to transform the image load from cache or from download. |
| | | You can provide transformer to cache and manager (Through the `transformer` property or context option `SDWebImageContextImageTransformer`). |
| | | From v5.20, the transformer class also can be used on animated image frame post-transform logic, see `SDAnimatedImageView`. |
| | | |
| | | @note The transform process is called from a global queue in order to not to block the main queue. |
| | | */ |
| | |
| | | @required |
| | | /** |
| | | For each transformer, it must contains its cache key to used to store the image cache or query from the cache. This key will be appened after the original cache key generated by URL or from user. |
| | | Which means, the cache should match what your transformer logic do. The same `input image` + `transformer key`, should always generate the same `output image`. |
| | | |
| | | @return The cache key to appended after the original cache key. Should not be nil. |
| | | */ |
| | |
| | | The tint color. |
| | | */ |
| | | @property (nonatomic, strong, readonly, nonnull) UIColor *tintColor; |
| | | /// The blend mode, defaults to `sourceIn` if you use the initializer without blend mode |
| | | @property (nonatomic, assign, readonly) CGBlendMode blendMode; |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | + (nonnull instancetype)transformerWithColor:(nonnull UIColor *)tintColor; |
| | | + (nonnull instancetype)transformerWithColor:(nonnull UIColor *)tintColor blendMode:(CGBlendMode)blendMode; |
| | | |
| | | @end |
| | | |