Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve pixel color

Status
Not open for further replies.

halfbarrel

Programmer
Jun 12, 2002
44
US
Hello,
What I would like to do is pass an image file into a c program as an argument on my linux box and then loop through it's pixels to see what color they are. Does someone know what the code is to get a pixel(specifically the pixels color) and what header/s would have to be included.
Thanks,
 
That would depend entirely on the format of the image file.
BMP, PNG, GIF, JPG - They're all different.


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top