TuSDKCPImageResultController Class Reference

Inherits from TuSDKCPResultViewController : TuSDKCPViewController : TuSDKICViewController : UIViewController
Declared in TuSDKCPImageResultController.h

Overview

图片处理结果视图控制器

  inputTempFilePath

输入的临时文件目录 (处理优先级: inputImage > inputTempFilePath > inputAsset)

@property (nonatomic, copy) NSString *inputTempFilePath

Declared In

TuSDKCPImageResultController.h

  inputAsset

输入的相册图片对象 (处理优先级: inputImage > inputTempFilePath > inputAsset)

@property (nonatomic, retain) id<TuSDKTSAssetInterface> inputAsset

Declared In

TuSDKCPImageResultController.h

  inputImage

输入的图片对象 (处理优先级: inputImage > inputTempFilePath > inputAsset)

@property (nonatomic, retain) UIImage *inputImage

Declared In

TuSDKCPImageResultController.h

  preview

预览图片视图

@property (nonatomic, readonly) UIButton *preview

Declared In

TuSDKCPImageResultController.h

  showResultPreview

是否显示处理结果预览图 (默认:关闭,调试时可以开启)

@property (nonatomic) BOOL showResultPreview

Declared In

TuSDKCPImageResultController.h

  isAutoRemoveTemp

控制器关闭后是否自动删除临时文件 (默认:NO)

@property (nonatomic) BOOL isAutoRemoveTemp

Declared In

TuSDKCPImageResultController.h

– loadOrginImage

加载来源图片

- (UIImage *)loadOrginImage

Return Value

image 来源图片

Declared In

TuSDKCPImageResultController.h

– cuterImage:cutRect:imageOrientation:

获取裁剪图片

- (UIImage *)cuterImage:(UIImage *)image cutRect:(CGRect)cutRect imageOrientation:(UIImageOrientation)imageOrientation

Parameters

image

图片对象

cutRect

裁剪百分区域

imageOrientation

图片方向

Return Value

image 裁剪图片

Declared In

TuSDKCPImageResultController.h

– cuterImage:cutRect:imageOrientation:cutRatio:

获取裁剪图片

- (UIImage *)cuterImage:(UIImage *)image cutRect:(CGRect)cutRect imageOrientation:(UIImageOrientation)imageOrientation cutRatio:(CGFloat)cutRatio

Parameters

image

图片对象

cutRect

裁剪百分区域

imageOrientation

图片方向

cutRatio

裁切比例 (当CGRectIsEmpty(cutRect) 生效)

Return Value

image 裁剪图片

Declared In

TuSDKCPImageResultController.h

– asyncLoadInputImageWithBlock:

异步加载输入图片

- (void)asyncLoadInputImageWithBlock:(TuSDKTKThreadStartBlock)block

Parameters

block

快速线程开始方法

Declared In

TuSDKCPImageResultController.h

– onAsyncImageLoaded:

异步图片加载完毕

- (void)onAsyncImageLoaded:(UIImage *)image

Parameters

image

图片

Declared In

TuSDKCPImageResultController.h

– checkImageValid:handler:

检测图片数据是否可用,如果原图在iCloud上,需要异步下载

- (BOOL)checkImageValid:(UIImage *)image handler:(TuSDKTSAssetProgressBlock)block

Parameters

image

图片

block

下载进度回调

Declared In

TuSDKCPImageResultController.h

– preProcessWithImage:

是否需要预处理图片

- (BOOL)preProcessWithImage:(UIImage *)image

Parameters

image

要显示的图片 @return

Declared In

TuSDKCPImageResultController.h

– postProcessWithImage:

图片加载并显示后,是否需要继续处理

- (void)postProcessWithImage:(UIImage *)image

Parameters

image

要显示的图片

Declared In

TuSDKCPImageResultController.h

– loadedInputImage:

异步加载输入图片完成

- (void)loadedInputImage:(UIImage *)image

Parameters

image

输入图片

Declared In

TuSDKCPImageResultController.h

– showResultPreview:

显示测试预览视图

- (BOOL)showResultPreview:(TuSDKResult *)result

Return Value

BOOL 是否显示测试预览视图

Discussion

@param result

Declared In

TuSDKCPImageResultController.h