Comment updates

This commit is contained in:
Bogdan Poplauschi 2017-10-18 12:01:26 +03:00
parent 17386829c1
commit a32ab28acb
3 changed files with 8 additions and 3 deletions

View File

@ -10,7 +10,10 @@
#import "SDWebImageCoder.h" #import "SDWebImageCoder.h"
/** /**
Built in coder that supports GIF Built in coder using ImageIO that supports GIF encoding/decoding
@note `SDWebImageIOCoder` supports GIF but only as static (will use the 1st frame).
@note Use `SDWebImageGIFCoder` for fully animated GIFs - less performant than `FLAnimatedImage`
@note The recommended approach for animated GIFs is using `FLAnimatedImage`
*/ */
@interface SDWebImageGIFCoder : NSObject <SDWebImageCoder> @interface SDWebImageGIFCoder : NSObject <SDWebImageCoder>

View File

@ -11,6 +11,8 @@
/** /**
Built in coder that supports PNG, JPEG, TIFF, includes support for progressive decoding Built in coder that supports PNG, JPEG, TIFF, includes support for progressive decoding
Also supports static GIF (meaning will only handle the 1st frame).
For a full GIF support, we recommend `FLAnimatedImage` or our less performant `SDWebImageGIFCoder`
*/ */
@interface SDWebImageImageIOCoder : NSObject <SDWebImageProgressiveCoder> @interface SDWebImageImageIOCoder : NSObject <SDWebImageProgressiveCoder>

View File

@ -66,7 +66,7 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
#pragma mark - Decode #pragma mark - Decode
- (BOOL)canDecodeFromData:(nullable NSData *)data { - (BOOL)canDecodeFromData:(nullable NSData *)data {
switch ([NSData sd_imageFormatForImageData:data]) { switch ([NSData sd_imageFormatForImageData:data]) {
// Do not support GIF and WebP decoding // Do not support WebP decoding
case SDImageFormatWebP: case SDImageFormatWebP:
return NO; return NO;
default: default:
@ -382,7 +382,7 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
#pragma mark - Encode #pragma mark - Encode
- (BOOL)canEncodeToFormat:(SDImageFormat)format { - (BOOL)canEncodeToFormat:(SDImageFormat)format {
switch (format) { switch (format) {
// Do not support GIF and WebP encoding // Do not support WebP encoding
case SDImageFormatWebP: case SDImageFormatWebP:
return NO; return NO;
default: default: