Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thumbnail?



On Wednesday, April 30, 2003, at 06:06 PM, Lorenzo wrote:

Hi,
I have a large image jpg I display in a NSImageView.
I resize the NSImage then I store it to an NSDictionary, as NSData, but
later, when I recall it and display to to a NSImageView, it has the same
original dimensions. I guess I didn't scaled the image but only the way it
has been shown.

Instead I want to store only a small scaled image (Thumbnail) of the
original image. How can I do?


Create a new NSImage the size of the thumbnail
lock focus on it
draw the big image into the thumbnail rect
unlock focus
save the thumbnail image
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.