Reputation: 11
getData() returns a tuples with two items each after converting an RGB image to grayscale. I'm sure this is how its supposed to work, but I'm having trouble finding any info on what this means and how to handle it since I need a singular value. The tuples it returns look like (212, 255), (212, 255), (212, 255), (212, 255). The first value increases over time while the second value always stays at 255. Could someone explain to me what this means?
To convert the original heat map image I had into grayscale,
im = Image.open("Images/0_result_disp_img.png").convert('LA')
Upvotes: 0
Views: 415
Reputation: 207758
You have converted to "greyscale + alpha" with convert('LA')
so the values you have are greyscale and alpha/transparency.
If you don't want transparency, use:
im = Image.open(...).convert('L')
Upvotes: 1