How to read PNG image to NSImage -
Posted
by user322111
on Stack Overflow
See other posts from Stack Overflow
or by user322111
Published on 2010-04-21T09:22:01Z
Indexed on
2010/04/21
9:23 UTC
Read the original article
Hit count: 270
cocoa
Hi how can i read Png image to NSImage. I tried the following way,but when i get the width and size of the image i'm getting some weird value.. if any one can direct me in right path.. highly appropriate..
NSImage * picture = [[NSImage alloc] initWithContentsOfFile: [bundleRoot stringByAppendingString:tString]];
NSLog(@"sixe %d %d",picture.size.width, picture.size.height);
if( picture ){
NSLog(@"Picture is not null");
}else {
NSLog(@"Picture is null.");
}
Thanks
© Stack Overflow or respective owner