In Python, how do I easily generate an image file from some source data? -


I have some data that I would like to imagine. Each byte of the source data roughly matches the pixel value of the image.

What is the easiest way to create an image file (bitmap) using Python?

You can create a picture with a list of pixel values:

 < Code> PIL import image img = Image.new ('RGB', (width, height)) img.putdata (my_list) img.save ('image.png')  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -