access to vImage_Buffer data

I'm wanting to access the raw pixel data in a vImage_Buffer, but all I seem to get is nonsense.


For a Planar8 buffer created from a CGImage I seem to be able to access vImage_Buffer.data like any pointer to a data array of UInt8. But when I convert to PlanarF, trying to access it like a pointer to an array of Floats just results in silly numbers (either zero, or very large, or very small).

Accepted Reply

Never mind. I didn't realise I had to add byteOrder32Little explicitely to the bitmapInfo when converting to floating point format. Problem solved.

Replies

Never mind. I didn't realise I had to add byteOrder32Little explicitely to the bitmapInfo when converting to floating point format. Problem solved.