Image detail --> mySQL via PHP

Discussion in 'PHP' started by gfreeman, May 11, 2007.

  1. #1
    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!
     
    gfreeman, May 11, 2007 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    T0PS3O, May 11, 2007 IP
  3. gfreeman

    gfreeman Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Lifesaver :)

    Thanks very much!
     
    gfreeman, May 11, 2007 IP