Re: Scale and convert image to JPEG using NSImage, NSImageRep, etc?
Re: Scale and convert image to JPEG using NSImage, NSImageRep, etc?
- Subject: Re: Scale and convert image to JPEG using NSImage, NSImageRep, etc?
- From: matt neuburg <email@hidden>
- Date: Thu, 25 Mar 2004 19:59:28 -0800
On Sun, 21 Mar 2004 19:10:55 -0500, Michael Rothwell <email@hidden>
said:
>
It there a Cocoa way to scale, say, a 100x100 pixel TIFF to 50x50
>
pixels, convert it to JPEG, and save it to a file?
>
>
things like setSize: seem to only change the display size, not cause
>
the image to actually re-scale.
(1) Whether an image scales when resized depends upon its
-scalesWhenResized.
(2) To convert to a jpeg, look at NSBitmapImageRep representationUsingType:
NSJPEGFileType.
m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide! NOW SHIPPING...! (Finally.)
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.