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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JPEG to "Pixel" Data 1

Status
Not open for further replies.

japhy

Programmer
Sep 27, 2004
12
US
Hi,

I'm trying to write a C++ routine to read a JPEG and convert it into a 100x100 array with values proportional to the color (i.e. red = 100, white = 0).

Does anyone know of a bit of code or at least a resource?

Thanks,
 
Try imagemagick - they have routines to convert from jpg to bmp. Once in bmp, you can load up your array. Remember that bmp stores its images upside down.

Also, remember that jpg is a compressed format and may not be a very accurate representation of the data.

Alternatively, load it into paint and convert it to bmp first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top