• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage scaling and ugliness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage scaling and ugliness


  • Subject: Re: NSImage scaling and ugliness
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 11 Jul 2006 20:11:56 -0700
  • Thread-topic: NSImage scaling and ugliness

On Mon, 10 Jul 2006 11:42:13 -0700, "Stephen F. Booth" <email@hidden> said:
>I am working on a view that contains an NSTableView displaying a list
>of files.  I want to display the file's icon and the last component
>of the pathname.  Rather than implement a custom subclass of
>NSTextFieldCell or NSImageCell (like ImageAndTextCell), I chose to
>just use a table with two columns.  The first is 16 pixels wide for
>the icon and the second holds the filename.  Everything works
>properly, but some of the icons when scaled to 16x16 look terrible
>when compared to the similar view in Finder.  I've posted a
>screenshot of the two windows at http://img354.imageshack.us/
>img354/3091/picture14fn.png
>
>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.

My code is the same as yours, and I am doing exactly what you're doing
(putting the icon in a table column of its own), and to my eye the icons are
the same as in the Finder. Feel free to download my app (NotLight) and tell
me if I'm wrong! And/or, feel free to send a file that demonstrates the
problem. Thanks - m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: NSCell mouse tracking best practices.
  • Next by Date: Re: [temporary workaround] NSDocument with NSMatrix crasher (10.4)
  • Previous by thread: Re: NSImage scaling and ugliness
  • Next by thread: Re: NSImage scaling and ugliness
  • Index(es):
    • Date
    • Thread