Menu

Photos.Framework

Mobi
2015-11-18
2015-11-19
  • Mobi

    Mobi - 2015-11-18

    Hi!

    What about Photos.Framework? I need PHImageManager to access image data

    Thanks,
    Felix

     
  • Mobi

    Mobi - 2015-11-18

    I am try to convert it, but requestImageForAsset won't work. Ideas?

      TPHImageManagerHandler1 = procedure(image : UIImage; info : NSDictionary) of object;
      TPHImageManagerHandler2 = procedure(imageData : NSData; dataUTI : NSString;
        orientation : UIImageOrientation; info : NSDictionary) of object;
      TPHImageManagerHandler3 = procedure(playerItem : AVPlayerItem; info : NSDictionary) of object;
      TPHImageManagerHandler4 = procedure(exportSession : AVAssetExportSession; info : NSDictionary) of object;
      TPHImageManagerHandler5 = procedure(asset : AVAsset; audioMix : AVAudioMix; info : NSDictionary) of object;
      TPHImageManagerHandler6 = procedure(livePhoto : PHLivePhoto; info : NSDictionary) of object;
    
      PHImageManagerClass = interface(NSObjectClass)
        ['{A820E3AF-729F-4AD7-B411-70D5459D62F2}']
        function defaultManager : Pointer; cdecl;
      end;
      PHImageManager = interface(NSObject)
        ['{AB278E9F-1932-4AEC-8A05-6DC1BCE8FF6E}']
        function requestImageForAsset(asset : PHAsset; targetSize : CGSize;
          contentMode : PHImageContentMode; options : PHImageRequestOptions;
          resultHandler : TPHImageManagerHandler1) : PHImageRequestID; cdecl;
        function requestImageDataForAsset(asset : PHAsset; options : PHImageRequestOptions;
          resultHandler : TPHImageManagerHandler2) : PHImageRequestID; cdecl;
        function requestPlayerItemForVideo(asset : PHAsset; options : PHVideoRequestOptions;
          resultHandler : TPHImageManagerHandler3) : PHImageRequestID; cdecl;
        function requestExportSessionForVideo(asset : PHAsset; options: PHVideoRequestOptions;
          exportPreset : NSString; resultHandler : TPHImageManagerHandler4) : PHImageRequestID; cdecl;
        function requestAVAssetForVideo(asset: PHAsset; options: PHVideoRequestOptions;
          resultHandler : TPHImageManagerHandler5) : PHImageRequestID; cdecl;
        function requestLivePhotoForAsset(asset: PHAsset; targetSize: CGSize;
          contentMode: PHImageContentMode; options: PHLivePhotoRequestOptions;
          resultHandler : TPHImageManagerHandler6) : PHImageRequestID; cdecl;
        procedure cancelImageRequest(requestID : PHImageRequestID); cdecl;
      end;
      TPHImageManager = class(TOCGenericImport<PHImageManagerClass, PHImageManager>)  end;
    
     

    Last edit: Mobi 2015-11-18
  • Mobi

    Mobi - 2015-11-19

    This is iOSSimulator problem http://qc.embarcadero.com/wc/qcmain.aspx?d=121418
    On iOSDevice works :D

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2015-11-19

    Hi

    If you have a sample project about it please send me to put in Demos folder,

    Regards

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.