Python - How to save a list as an image? -


i generate regular list. possible save list jpeg image or png or whatever can open image , @ it? trying figure out using python imaging library (pil).

here 1 of possible solutions:

  1. create empty image object using: image.new(mode, size, color)

  2. modify image object contain data "list"

  3. save image

e.g.:

new_img = image.new("l", (new_x_size, new_y_size), "white") new_img.putdata(new_img_list) new_img.save('out.tif') 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -