Re: Creating a bitmap of a scaled-down NSImage
Re: Creating a bitmap of a scaled-down NSImage
- Subject: Re: Creating a bitmap of a scaled-down NSImage
- From: Nir Soffer <email@hidden>
- Date: Tue, 27 Mar 2007 04:23:00 +0200
On Mar 27, 2007, at 04:09, Nir Soffer wrote:
On Mar 27, 2007, at 03:39, John Stiles wrote:
I have an NSImage that has arrived from an external source that I
don't directly control. I need to scale it down and rasterize it
to an NSBitmapImageRep—the ultimate goal is to get it into an
OpenGL texture, and we have maximum texture-size limits that I
need to respect.
Use CoreImage - either CIAffineTransform (faster, lower quality) or
CILanczosScaleTransform (slower, higher quality).
I'm not sure it exists on 10.3.9, but I think you can use vImage
library there. There is vImageAffineWarp_ARGB8888 that can scale
image with the proper affine transformation matrix.
http://developer.apple.com/documentation/Performance/Conceptual/
vImage/Chapter11/chapter_11.1_section_3.html#//apple_ref/c/func/
vImageAffineWarp_ARGB8888
Best Regards,
Nir Soffer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden