Created
February 6, 2012 21:18
-
-
Save rhizoome/1754954 to your computer and use it in GitHub Desktop.
Quick Look to TIFF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFUrl url = CFUrl.FromUrlString("file:///Users/ganwell/Desktop/Untitled.png", null); | |
CGImage img = QuickLook.ThumbnailImageCreate(url, new SizeF(256, 256), new NSDictionary()); | |
NSImage nsimg = new NSImage(img, new SizeF(256, 256)); | |
NSObject obj = Runtime.GetNSObject | |
(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend (nsimg.Handle, Selector.GetHandle("TIFFRepresentation"))); | |
NSData data = obj as NSData; //-> null. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment