TuSDKCPImage Class Reference

Inherits from UIImage
Declared in TuSDKCPImage.h

Overview

TuSDKCPImage 基类

+ getBundlePreferredScales

根据当前设备获取合适的DPI缩放级别序列

+ (NSArray *)getBundlePreferredScales

Return Value

DPI 序列数组

Declared In

TuSDKCPImage.h

+ getResFilename:byScale:

根据缩放级别获取文件的全名,补齐 “@2x” 类似后缀

+ (NSString *)getResFilename:(NSString *)string byScale:(CGFloat)scale

Parameters

string

文件前缀

scale

DPI缩放级别

Return Value

filename 文件全名

Declared In

TuSDKCPImage.h

+ getScaleFromFilename:

从文件名获取对应的缩放级别

+ (CGFloat)getScaleFromFilename:(NSString *)string

Parameters

string

文件名

Return Value

DPI 缩放级别

Declared In

TuSDKCPImage.h

+ UIImageOrientationFromEXIFValue:

Image orientation

+ (UIImageOrientation)UIImageOrientationFromEXIFValue:(NSInteger)value

Parameters

value

property value in Exif

Return Value

UIImageOrientation

Declared In

TuSDKCPImage.h

  imageType

获取文件类型

@property (nonatomic, readonly) lasqueImageType imageType

Declared In

TuSDKCPImage.h

– initWithContentsOfFile:

从指定的路径初始化

- (instancetype)initWithContentsOfFile:(NSString *)path

Parameters

path

文件路径

Return Value

TuSDKCPImage对象

Declared In

TuSDKCPImage.h

– initWithData:

根据NSData初始化

- (instancetype)initWithData:(NSData *)data

Parameters

data

NSData对象

Return Value

TuSDKCPImage对象

Declared In

TuSDKCPImage.h

– initWithData:scale:

根据NSData和DPI缩放级别初始化

- (instancetype)initWithData:(NSData *)data scale:(CGFloat)scale

Parameters

data

NSData对象

scale

DPI缩放级别

Return Value

TuSDKCPImage对象

Declared In

TuSDKCPImage.h