Reading an image is almost like reading an array. The only difference beeing that the size and offset need to be three-dimensional.
clEnqueueReadImage($queue, $memobj, $blocking, $offset, $size, $stride, $slice_pitch, $target, 0, null, null);
The $stride defines how many bytes a row has. Normall...