Numpy Tensorflow feeding image in memory

Numpy Tensorflow feeding image in memory,numpy,tensorflow,Numpy,Tensorflow,I receive an image from network which I convert to a numpy array using fromfile function. Now I want to pass this unit8 type array to decode_image of tensorflow v1. How can I achieve that? I do not want to have a file on disk and do it all in-memory.

I receive an image from network which I convert to a numpy array using

`fromfile`

function. Now I want to pass this `unit8`

type array to `decode_image`

of tensorflow v1. How can I achieve that? I do not want to have a file on disk and do it all in-memory.
**#1**

It turned out that the answer is pretty simple. Supposed `nd`

is the 1-D array returned from `fromfile`

then you can call function `tostring`

and pass that to `decode_image`

of tensorflow.