View Single Post

  #1 (permalink)  
Old 10-19-2004
RootShell
 
Posts: n/a
Default GD choosing what colors to display

Hello

How can i use the GD Library to only show the White (or the hex value of
white) pixels of a image?

Imagine i have a 8 color picture in PNG format.

This is to use on a color puzzle that im trying to build...

1 - The user sees a completely BLACK image with the original size of
the picture

2 - the user selects GREEN (from a color palete)

3 - the image updates and shows all BLACK/GREEN pixels (using
something like "ShowImage.php?c=BG" or anything else)

4 - the user selects RED (from a color palete)

5 - the image updates and shows all BLACK/GREEN/RED pixels (using
something like "ShowImage.php?c=BGR" or anything else)

and so on...

Is this possible using the GD Library?

I can read the file from PNG and show it (using the gd library), i can even
change the pallete of the image based on another file's pallete, but i
wanted to dynamicaly change which colors to show on screen, based on user
input.

Any help on this appreciated, since im feeling a lit bit lost... Even the
funtion that has to be used to achive this will be enough for getting me
started.

Thanks,
RootShell


Reply With Quote