Native Extension pass ByteArray from haxe to C++

Oh, right, try uint8Array.buffer, or I think you can cast it like this:

var bytes:Bytes = bitmapData.image.buffer.data;

I think that will do the conversion for you as well