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
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 mails | Author | Date |
|---|---|---|
| Stephen F. Booth | Jul 10, 20:42 | |
| Christian Walther | Jul 10, 22:05 | |
| Matt Neuburg | Jul 12, 05:11 | |
| Matt Neuburg | Jul 13, 21:55 | |
| Matt Neuburg | Jul 14, 22:57 |






Cocoa mail archive

