I'm having problems with the use of the class NSImage. I'm trying to use the function initWithData: but it does not work (anything related to NSImage doesn't work). Here is a simple example of what im trying. The NSData data is right.
My project is a commandline tool of foundation type.
NSData *imdata =[[NSData alloc] initWithContentsOfFile:@"/Users/JulianDavid/Desktop/ecoli_20000.png"];
if(!imdata){
    NSLog(@"there is data");
}
NSImage *imag=[[NSImage alloc]initWithData:imdata];
 
     
     
    