I'm trying to access the width and height dimensions of an NSImage initialized with a JPEG from disk. However, [NSImage size].width and [NSImage size].height is returning strange values. For instance, for a 100 x 200 JPEG the reported width is 1079574528 and height is 0.
Here's some sample code:
NSImage* image = [[NSImage alloc] initWithContentsOfFile: @"my_picture.jpg"];
NSLog(@"Width: %i Height: %i",[image size].width, [image size].height);
And output:
Width: 1079574528 Height: 0
Is [NSImage size] broken or am I just using it incorrectly?
Cheers