Answers for "saving numpy array as image with pil"

9

ndarray to pil image

from PIL import Image
image_from_array = Image.fromarray(nd_array)
Posted by: Guest on July-28-2020
0

save numpy arrayw with PIL

from PIL import Image
im = Image.fromarray(A)
im.save("your_file.jpeg")
Posted by: Guest on April-18-2021

Python Answers by Framework

Browse Popular Code Answers by Language