I've just made a first draft kind of thing for polls on my website (http://www.crudpot.net). I'm sure there is probably a much better way to do it but the way i did it is as follows:
I made one table for the question and the possible answers (for you it would be the picture and the rating). then i made a second table for calculating the votes, they link together by having an "pollid" field matching the "id" of the poll... I hope that doesn't confuse you 🙂 anyway the ID in the question table and the POLLID in the answer table match up.
When people vote, their vote is added to the number stored in the answer table. all the answer totals are added up and divided by the total. Then to display a percentage you simply multiply one of the answers by 100.
If this doesn't make sense it's because its 1:30AM and i'm tired. Email me if this doesn't help and I'll see what i can do 🙂