Help with generating image from captured data

As you have only pixel data you will have to draw each pixel to an image.

Your problem is quite similar to this Unable to display image from base64 - #18 by Steve-Mcl you can use the flow in there as a basis for a solution.