Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== NSImage ====== Cocoa documentation says that initByReferencingFile is a "lazy" way of doing things, so I assume it should be avoided. <code> // initWithContentsOfFile gives us full resolution for some reason, but // initByReferencingFile gives us a low resolution representation; we must // also have setDataRetained to get and keep the full resolution and prevent // blocky pixelation problems NSImage *image = [[NSImage alloc] initWithContentsOfFile:file]; [image setDataRetained:YES]; </code> docs/programming/cocoa_and_objective-c/nsimage.txt Last modified: 2008/08/03 00:25by 127.0.0.1