PNG画像をNSImageに読み込むにはどうすればよいですか。私は次の方法を試しましたが、画像の幅とサイズを取得すると、奇妙な値が得られます..誰かが私を正しい道に導くことができれば..非常に適切です..
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.");
}
ありがとう