I\'ve a basic problem with Python\'s library PIL. I have some .txt files containing only 0 and 1 values arranged in matrices. I have transf
You can get a RGB image from a monochromatic one like this:
from PIL import Image from numpy import eye arr = (eye(200)*255).astype('uint8') # sample array im = Image.fromarray(arr) # monochromatic image imrgb = im.convert('RGB') # color image imrgb.show()