When using NSImage
's imageNamed:
method to get the icon for the current computer, if I'm running on a Mac Mini, then I get a low resolution image. If I run the same code from my MacBook, then I get a high-res icon like I'd expect.
My code is as follows:
NSImage *image;
image = [NSImage imageNamed:@"NSComputer"];
[image setSize: NSMakeSize(512,512)];
NSData * tiffData = [image TIFFRepresentation];
NSBitmapImageRep *bitmap = [NSBitmapImageRep imageRepWithData:tiffData];
data = [bitmap representationUsingType:NSPNGFileType properties:nil];
mime = @"image/png";
When I run that on my MacBook, everything works great and I get a 512x512 icon of the my computer. When I run it on my Mac Mini, i get a 32x32 icon that's been upscaled to 512x512.
Any ideas on how I can get the high-res version?