Re: Incompatible types error using vImage
Re: Incompatible types error using vImage
- Subject: Re: Incompatible types error using vImage
- From: Fritz Anderson <email@hidden>
- Date: Wed, 31 Mar 2004 10:54:32 -0600
The second parameter is supposed to be an array of vImage_Buffer
pointers. Declare result to be
vImage_Buffer * result[3];
initialize
result[i] = malloc(sizeof(vImage_Buffer)); // etc
and pass it as result.
-- F
On 31 Mar 2004, at 1:48 AM, Ken Tozier wrote:
I'm trying to package the vImage function
"vImageConvert_ChunkyToPlanar8" inside an easier to use
NSBitmapImageRep category like the following but it keeps choking on
the indicated line. I'm sure it's a simple "C" syntax error, but
nothing I've tried satisfies the compiler. Could someone point out what
I'm doing wrong?
...
vImage_Buffer *result = (vImage_Buffer *) malloc(3 *
sizeof(vImage_Buffer));
...
err = vImageConvert_ChunkyToPlanar8 (
(void *)sourceChannels,
//----------------------------- this is the problem line
---------------------------------
// this doesn't work
result,
// neither does this
(vImage_Buffer *) result,
// nor this
&result
/
/----------------------------------------------------------------------
-
-----------------------
3,
3,
[self pixelsWide],
[self pixelsHigh],
[self bytesPerRow],
flags
);
}
The function is defined like so in the vImage documentation:
vImage_Error vImageConvert_ChunkyToPlanar8 (
const void *srcChannels[],
const vImage_Buffer *destPlanarBuffers[],
unsigned int channelCount,
size_t srcStrideBytes,
unsigned int srcWidth,
unsigned int srcHeight,
unsigned int srcRowBytes,
vImage_Flags flags
);
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
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.