Reading all the colors in a PNG Image

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Forum Newbie
Posts: 9
Joined: Fri Jan 20, 2006 12:57 am

Reading all the colors in a PNG Image

Post by ahsanra »

Thanks alot jason,

I really appreciate your help.

I would like you to help me in one another task .. how can i read all the colors that are available in an image (i am only working with PNG, BMP and TIF) and fill them in a drop down box.

I need them becasue i want my system to be completely dynamic .. it will read all the colors that are present in the image and then choosing the specific image color from one drop down and other color from another drop down with is filled with custom colors. And the system will replace the color from first drop down with the one present in another drop down.

Please help me how can i read all the colors present in an image ?

Thanks in advance.

Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

Original thread: viewtopic.php?t=43130
User avatar
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

this didn't need a new thread. :?