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 -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -