I use the code below to get the width and height of a NSImage:
NSImage *image = [[[NSImage alloc] initWithContentsOfFile:[NSString stringWithFormat:s]] autorelea
the direct API gives also the correct results
CGImageRef cgImage = [oldImage CGImageForProposedRect:nil context:context hints:nil]; size_t width = CGImageGetWidth(cgImage); size_t height = CGImageGetHeight(cgImage);