I have an array of binary numbers in Python:
data = [0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1...]
I would like to extract this data and save it as bitmap images, and β0β is white and β1β is black. I know that there are 2500 numbers in the array, which corresponds to a 50x50 bitmap. I downloaded and installed PIL, but I'm not sure how to use it for this purpose. How to convert this array to the corresponding image?
python python-imaging-library
interplex
source share