save NSImage to File, and convert image format

October 20, 2012   ·   0 Comments

Screen Shot 2012-10-20 at 10.55.47 AM

sample code:111_NSImage_save_File

  
    NSBitmapImageRep *imgRep = [[self.m_imageview.image representations] objectAtIndex: 0];
    NSData *data = [imgRep representationUsingType: NSPNGFileType properties: nil];
    [data writeToFile: @"/Users/powenko/Desktop/file.png" atomically: NO];
    

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
MAC139

MAC

Amazon

adsbygoogle

Recent Posts

Categories

Amazon