Update the comment about scale factor for coders
This commit is contained in:
parent
c99ddbfac9
commit
7c5c114aa5
|
@ -51,7 +51,6 @@ FOUNDATION_EXPORT SDImageCoderOption _Nonnull const SDImageCoderWebImageContext;
|
||||||
/**
|
/**
|
||||||
This is the image coder protocol to provide custom image decoding/encoding.
|
This is the image coder protocol to provide custom image decoding/encoding.
|
||||||
These methods are all required to implement.
|
These methods are all required to implement.
|
||||||
You do not need to specify image scale during decoding because we may scale image later.
|
|
||||||
@note Pay attention that these methods are not called from main queue.
|
@note Pay attention that these methods are not called from main queue.
|
||||||
*/
|
*/
|
||||||
@protocol SDImageCoder <NSObject>
|
@protocol SDImageCoder <NSObject>
|
||||||
|
@ -71,7 +70,7 @@ FOUNDATION_EXPORT SDImageCoderOption _Nonnull const SDImageCoderWebImageContext;
|
||||||
@note This protocol may supports decode animated image frames. You can use `+[SDImageCoderHelper animatedImageWithFrames:]` to produce an animated image with frames.
|
@note This protocol may supports decode animated image frames. You can use `+[SDImageCoderHelper animatedImageWithFrames:]` to produce an animated image with frames.
|
||||||
|
|
||||||
@param data The image data to be decoded
|
@param data The image data to be decoded
|
||||||
@param options A dictionary containing any decoding options. Pass @{SDImageCoderDecodeFirstFrameOnly: @(YES)} to decode the first frame only.
|
@param options A dictionary containing any decoding options. Pass @{SDImageCoderDecodeScaleFactor: @(1.0)} to specify scale factor for image. Pass @{SDImageCoderDecodeFirstFrameOnly: @(YES)} to decode the first frame only.
|
||||||
@return The decoded image from data
|
@return The decoded image from data
|
||||||
*/
|
*/
|
||||||
- (nullable UIImage *)decodedImageWithData:(nullable NSData *)data
|
- (nullable UIImage *)decodedImageWithData:(nullable NSData *)data
|
||||||
|
|
|
@ -108,10 +108,6 @@ static id<SDImageLoader> _defaultImageLoader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (nullable UIImage *)scaledImageForKey:(nullable NSString *)key image:(nullable UIImage *)image {
|
|
||||||
return SDScaledImageForKey(key, image);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (SDWebImageCombinedOperation *)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDInternalCompletionBlock)completedBlock {
|
- (SDWebImageCombinedOperation *)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDInternalCompletionBlock)completedBlock {
|
||||||
return [self loadImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock];
|
return [self loadImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue