I have a series of two-coloured images (black and white) that I'd like to "store" in a mySQL database on a pixel-by-pixel basis. I'd like to do this because I want to quickly refer to the X and Y co-ordinates of a particular image and determine whether the pixel there is black, or white. Unless there's a better way, how can I read in each pixel and then store them in mySQL, such as: UPDATE table SET colour={$colour} WHERE (x={$x} AND y={$y}) So for a particular value of X and Y, how can I set $colour? Thanks all!