Re: vImage crop?
Re: vImage crop?
- Subject: Re: vImage crop?
- From: Matt Johnston <email@hidden>
- Date: Mon, 3 Apr 2006 10:37:22 +0800
On Sat, Apr 01, 2006 at 05:49:16AM +0000, Juan P. Pertierra wrote:
> Hello,
>
> Is there any way to perform a crop using any of the vImage
> functions? That is, to create a new smaller image from a
> larger image by selecting a region of interest from the
> original image?
You can use the 'rowBytes' value of a vImage_Buffer for
this. Set the 'data' pointer to the address of the top-left
pixel, set rowBytes to the width of the larger image, and
set the 'width' and 'height' to the size of the smaller
image.
The ROI parameters are still useful for functions that need
to refer to pixels outside the cropped area.
http://developer.apple.com/documentation/Performance/Conceptual/vImage/Chapter2/chapter_2_section_2.html
Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden