Re: How to scale an NSImage
Re: How to scale an NSImage
- Subject: Re: How to scale an NSImage
- From: Peter Fischer <email@hidden>
- Date: Sun, 24 Aug 2003 09:29:24 -0400
Tito -
After creating your image, pass it a set scales when resized
message, and change the size:
NSImage *myImage = [however you allocated it]
[myImage setScalesWhenResized:YES];
NSSize newSize;
newSize.width = 64;
newSize.height = 64;
[myImage setSize:newSize];
The only thing I have seen with the scaling is that it pretty much only
works one way. An NSImage will scale very well from large to small,
but scales poorly from small to large, and ends up being blurry. I
find that going from small to large, its just better to reload the
image.
--Pete
On Sunday, August 24, 2003, at 04:43 AM, Tito Ciuro wrote:
Hello,
I have a 128 x 128 image which I'd like to scale at 64 x 64. Any ideas?
Thanks!
-- Tito
_______________________________________________
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.
_______________________________________________
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.