On Dec 15, 2009, at 22:31, Maxwell, Adam R wrote: > On 12/15/09 13:04, "Christiaan Hofman" <[email protected]> wrote: > >> >> On Dec 15, 2009, at 20:09, Maxwell, Adam R wrote: >> >>> I notice this is removed, but recall that the centering/scaling is only part >>> of that cell; using -[NSImage bestImageRepForSize:device:] is possibly the >>> more important part, since NSImage often picks a poor representation at many >>> sizes. This is really noticeable with system images that have multiple >>> reps. It may be fixed on 10.6 if NSImage/NSImageCell uses >>> -bestRepresentationForRect:context:hints:, but NSImage caching might still >>> get in the way, unless they've fixed it. >>> >>> -- >>> Adam >> >> The release notes indicate a lot of changes to image caching. > > Yeah, things improved a lot in 10.6. NSImage is probably fixed as much as > it can be, short of dumping it entirely. > >> And AFAICS >> NSImageCell draws the correct rep, with the minimum size just larger or equal >> to the target rect. Would you have a test case where things were drawn >> poorly? > > Draw a URL icon in a tableview. IIRC if the image has a rep of size 16 and > the cell wants an image of that size, it will use it; otherwise, it uses the > largest rep and scales it down. You used to see this in the main table by > playing with the icon column widths. At one size it would draw just an "@" > in sharp detail, but at a slightly different size it would draw the "@" with > a fuzzy "HTTP" below it.
I don't see that, at least on 10.6.2. I'm pretty sure it's using the next largest rep. > > It's also very worthwhile to badge individual reps of system icons, say if > you want to apply a CIFilter and change the color (and maybe you do this...I > haven't looked recently). I found that you can end up with some nasty edge > artifacts otherwise. I'm not completely sure what you mean, but at least for group icons based on system icons I create both a 16 and 32 rep (I don't think it's worthwhile to have a 128 rep). > > Note that I don't recall trying any of this on 10.6, but I can only use that > at home anyway. 10.6 does seem to have fixed these issues. For me it's a real hassle to check 10.5 now ;) BTW, I got a problem with bestImageRepForSize:device:. The returned rep can be nil, for instance when the target size is larger than the largest rep (or when the colorspace name is different). You've got an idea? Christiaan ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Bibdesk-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-develop
