• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Has anyone successfully used vImageConvert_ChunkyToPlanar8?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Has anyone successfully used vImageConvert_ChunkyToPlanar8?


  • Subject: Re: Has anyone successfully used vImageConvert_ChunkyToPlanar8?
  • From: Alastair Houghton <email@hidden>
  • Date: Fri, 2 Apr 2004 11:25:39 +0100

On 1 Apr 2004, at 10:00, Ken Tozier wrote:

> I've tried every thing I can think of (casting, using pointers to
> arrays, using examples from others etc) to pass in the "const
> vImage_Buffer *destPlanarBuffers[]," field of
>
>> vImage_Error vImageConvert_ChunkyToPlanar8 (...);
>>
>
> the compiler always returns: "passing arg 2 of
> `vImageConvert_ChunkyToPlanar8' from incompatible
> pointer type" which makes me think it's a syntax error on my part but
> when literally nothing works, it makes me suspect there is something
> amiss with the headers or something.
>
> Here's what I've tried so far:
>
> vImage_Buffer *result[3] = { malloc(sizeof(vImage_Buffer)),
> malloc(sizeof(vImage_Buffer)), malloc(sizeof(vImage_Buffer)) };
>
> /* fill in other fields */
>
> call function
> err = vImageConvert_ChunkyToPlanar8(srcChannels, result, <other
> params here>);
> err = vImageConvert_ChunkyToPlanar8(srcChannels, &result, <other
> params here>);
> err = vImageConvert_ChunkyToPlanar8(srcChannels, (vImage_Buffer *)
> result, <other params here>);
> err = vImageConvert_ChunkyToPlanar8(srcChannels, const result, <other
> params here>);
> err = vImageConvert_ChunkyToPlanar8(srcChannels, const &result,
> <other params here>);
> err = vImageConvert_ChunkyToPlanar8(srcChannels, const (vImage_Buffer
> *) result, <other params here>);

vImage isn't really Cocoa, so you should probably be asking one of the
other mailing lists, however...

The problem is that

const vImage_Buffer *destPlanarBuffers[]

is an array of const pointers, *not* a const array of pointers or a
const array of const pointers. (This is almost reminiscent of a
certain twisty maze of little passages I'm sure we've all been lost in
;->)

Also, when passed as a parameter, this is equivalent to

const vImage_Buffer **destPlanarBuffers

Anyway, I think you need something like

err = vImageConvert_ChunkyToPlanar8(srcChannels, (const vImage_Buffer
**)result, ...);

Kind regards,

Alastair.

--
http://www.alastairs-place.net

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


References: 
 >Has anyone successfully used vImageConvert_ChunkyToPlanar8? (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Is the internet avaliable question
  • Next by Date: Java or Objective-C for Cocoa?
  • Previous by thread: Has anyone successfully used vImageConvert_ChunkyToPlanar8?
  • Next by thread: Re: Has anyone successfully used vImageConvert_ChunkyToPlanar8?
  • Index(es):
    • Date
    • Thread