Theocacao
Leopard
Design Element
Comment on "Proportional Scaling with NSImage"
by Blain — Oct 01
Odd question: Is there any advantage or disadvantage to adding an ImageRep instead of generating a new image that I'm not seeing?

I imagine you'd need to keep the aspect ratio, and therefore, recalculate the centering, but then the caching could be done by cocoa almost for free; Thumbnails would fall to the smaller imageRep, it'd be released when the image is released, and if you ever choose to do an iPhoto-like "Zoom from thumbnail to full size" slider, you don't have to worry about swapping in and out the cached version.

I'm still not seeing any goofball mistakes. What was it?
Back to "Proportional Scaling with NSImage"
Design Element

Copyright © Scott Stevenson 2004-2015