Tensorflow-Lite's Pix2Pix implementation outputs a Uint8List:
Uint8List input;
var output = await Tflite.runPix2PixOnBinary(binary: input, asynch: true);
The result now has be converted to an Image object in order to display it. This is the problem.
It seems like pictures have some kind of header or signature, which is essential for the decodeImage() function of the Image package or similar decode functions (MemoryImage, Image.memory, decodeImageFromList).
This answer offers a solution, unfortunately it is only for 256 different colors (one channel?). TfLite outputs x channels tho...
I am looking for something like the Python Pillow Package and its function
new_image = Image.fromarray(array)
or some other approach to display the Pix2Pix output.
Thanks!