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: Shawn Erickson <email@hidden>
- Date: Mon, 26 Mar 2007 20:33:27 -0700
On Mar 26, 2007, at 7:23 PM, Nir Soffer wrote:
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
Actually likely want to use the scale operations...
<http://developer.apple.com/documentation/Performance/Conceptual/
vImage/Chapter11/chapter_11.1_section_3.html#//apple_ref/doc/c_ref/
vImageScale_ARGB8888>
-Shawn_______________________________________________
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