Skip navigation.
 
mlRe: NSImage scaling and ugliness
FROM : Christian Walther
DATE : Mon Jul 10 22:05:42 2006

Stephen F. Booth wrote:
> My code for grabbing the icon looks like:
>
> NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:filename];
> [icon setSize:NSMakeSize(16, 16)];
>
> I have tried setting the scalesWhenResized property, with identical 
> results.  The icons that aren't pretty are mainly ones that have no 
> 16x16 representation, but since Finder can display them I assume 
> there is something I'm not doing.


Looks like the thing you're not doing is

  [[NSGraphicsContext currentContext] setImageInterpolation: 
NSImageInterpolationHigh];


  -Christian

Related mailsAuthorDate
mlNSImage scaling and ugliness Stephen F. Booth Jul 10, 20:42
mlRe: NSImage scaling and ugliness Christian Walther Jul 10, 22:05
mlRe: NSImage scaling and ugliness Matt Neuburg Jul 12, 05:11
mlRe: NSImage scaling and ugliness Matt Neuburg Jul 13, 21:55
mlRe: NSImage scaling and ugliness Matt Neuburg Jul 14, 22:57