I'm trying to figure out how to convert a jpg into a list of lists (using python 3.2.3) such that:
[
[red,blue,red,etc..], #line1
[blue,red,yellow, etc...], #line2
[orange,yellow,black,etc...], #Last Line
]
Basically each list within the main list represents a horizontal line of colour values starting from the top of the image.
I thought it was going to be easy, just write a little script to extract the data from the jpg file. Hah! After looking into that I realized that was going to be a lot more work than I really want to do.
So far I'm thinking converting it to a bitmap and then writing the data into a suitable format is my best bet. Of course then I have to figure out how to extract the info from a bitmap.
Now since I'm sure other people have had to do this before, someone must know a far easier way I can go about that. I've tried looking around but haven't had any luck so far.
Thanks