Can someone tell me how can I get the true width and height of NSImage? I noticed that images with a higher DPI than 72 have inaccurate width and height with NSImage.size options.
I saw this example on Cocoadev:
NSBitmapImageRep *rep = [image bestRepresentationForDevice: nil];
NSSize pixelSize = NSMakeSize([rep pixelsWide],[rep pixelsHigh]);
However, bestRepresentationForDevice is deprecated by 10.6 ... what can I use as an alternative, the documentation does not offer another method?
source
share