Hi Nicobono,
What is the length of your U8 image array? If it is 5,242,880 elements long (1280*1024*4), then you do have an RGB32 image (or 3,932,160 for RGB24). But because the array is U8, I suspect that the image is already converted to U8 greyscale when it comes out of the loop, and will be 1,310,720 elements long (1280*1024). If the image is greyscale, then the VI I posted will work. If the image is RGB, then you will have to transform the image into RGB32, and use the
IMAQ ArrayToColorImage.vi to convert to an image.
One simple way to convert from a U8 array to a U32 array of two dimensions is to use nested while loops, and the RGB to color VI for three consecutive elements for each pixel. That method iterates through the entire pixel array however, which is quite slow. A more succinct method is to use array manipulation. I have attached a VI that performs both methods, assuming an RGB24 image in a U8 array form.
Hope this helps!