Tag Archives: toimage

Error in SciPy. Misc. Toimage()

Error in SciPy. Misc. Toimage()

I have been troubled by this problem for a long time. In fact, I finally found that the toimage function has been cancelled, or there is no such function. There is a new function to replace it, that is image. Fromarray. The specific functions are as follows:

from PIL import Iamge
img = Image.fromarray(np.uint8(image_array)).covert('RGB')
img.save('dir')

note: NP. Uint8 () in the program is the image_Convert array to int type and implement the package that needs to install pilot
PIP install – I https://pypi.tuna.tsinghua.edu.cn/simple Pilot (mirror of Tsinghua source)