TuSDKCPGifDecoder Class Reference

Inherits from TuSDKCPImageDecoder : NSObject
Declared in TuSDKCPGifDecoder.h

+ decodeData:scale:

解析图片数据

+ (instancetype)decodeData:(NSData *)data scale:(CGFloat)scale

Parameters

data

图片数据

scale

DPI缩放级别

Return Value

data TuSDKCPGifDecoder对象

Declared In

TuSDKCPGifDecoder.h

  frameCount

Frame count

@property (nonatomic, readonly) NSUInteger frameCount

Declared In

TuSDKCPGifDecoder.h

  loopCount

动画播放次数, 0表示无限循环

@property (nonatomic, readonly) NSUInteger loopCount

Declared In

TuSDKCPGifDecoder.h

  duration

动画播放一次的总时长,单位: 秒

@property (nonatomic, readonly) NSTimeInterval duration

Declared In

TuSDKCPGifDecoder.h

– updateData:stopAppend:

使用增量方式更新图片数据

- (BOOL)updateData:(NSData *)data stopAppend:(BOOL)stopAppend

Parameters

data

图片数据

stopAppend

是否停止添加数据

Return Value

BOOL 操作是否成功

Declared In

TuSDKCPGifDecoder.h

– frameAtIndex:shouldDecodeData:

获取指定帧的对象

- (TuSDKCPImageFrame *)frameAtIndex:(NSUInteger)index shouldDecodeData:(BOOL)shouldDecodeData

Parameters

index

帧索引

shouldDecodeData

是否解析数据

Return Value

TuSDKCPImageFrame 对象

Declared In

TuSDKCPGifDecoder.h

– frameDurationAtIndex:

获取指定帧的时长,单位: 秒

- (NSTimeInterval)frameDurationAtIndex:(NSUInteger)index

Parameters

index

帧索引

Return Value

NSTimeInterval 对象 帧时长

Declared In

TuSDKCPGifDecoder.h