Git Product home page Git Product logo

Comments (2)

banchichen avatar banchichen commented on May 27, 2024

你好,请参考TZImagePickerController的h文件:
// 这个照片选择器不会自己dismiss,用户dismiss这个选择器的时候,会执行下面的handle
// 如果用户没有选择发送原图,第二个数组将是空数组
@Property (nonatomic, copy) void (^didFinishPickingPhotosHandle)(NSArray<UIImage *> *photos,NSArray *assets);
@Property (nonatomic, copy) void (^didFinishPickingPhotosWithInfosHandle)(NSArray<UIImage *> *photos,NSArray *assets,NSArray<NSDictionary *> *infos);

如果用户选择了原图,assets数组会不是空数组,如果没有选择原图,那这个数组是个空数组。
assets数组装着asset对象,iOS8以上是PHAsset对象,iOS8以下是ALAsset对象,每一个asset对象,对应一个照片/视频/音频资源。
参考TZImageManager的h文件的方法,可以用一个asset对象去获得一张照片。
我错了.... 我的TZImageManager,没有提供获得原图的接口,只有获得全屏图片的接口...待我有空更新一下吧。你急着用的话,你把TZImageManager类235行的那个方法自己复制粘贴一下,把242行的targetSize设置为PHImageManagerMaximumSize,然后把252-256行删掉,加一句imageRef = assetRep.fullResolutionImage; 这样设置后,就是获得原图,原图一般比较大,性能较差。

from tzimagepickercontroller.

banchichen avatar banchichen commented on May 27, 2024

同样,你也可以用代理方法,代理和Block实现一个就可以。详见TZImagePickerController和TZImageManager的h文件

from tzimagepickercontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.