Suppose I have a list of pixels (represented as tuples with 3 RGB values) in a list that looks like list(im.getdata())
, like this:
[(0,0,0),(255,255,255),(38,29,58)...]
How do I create a new image using RGB values (each tuple corresponds to a pixel) in this format?
Thanks for your help.
You can do it like this:
You can also use
scipy
for that:gives