ReadPixel (as well ReadPixelFast) need an image buffer to work with.
So you should first set the image buffer:
setbuffer imagebuffer(heightmap)
then lock the buffer with the command lockbuffer
At the end of the process, use UnlockBuffer.
Hope this helps,
Sergio.
So you should first set the image buffer:
setbuffer imagebuffer(heightmap)
then lock the buffer with the command lockbuffer
At the end of the process, use UnlockBuffer.
Hope this helps,
Sergio.