Reading an image file in C/C++


I need to read an image file in C/C++. It would be very great, if some one can post the code for me.

I work on gray scale images and the images are JPEG. I would like to read the images into a 2D array which will make my work easy.

10/5/2018 6:07:06 PM

You could write your own by looking at the JPEG format.

That said, try a pre-existing library like CImg, or Boost's GIL. Or for strictly JPEG's, libjpeg. There is also the CxImage class on CodeProject.

Here's a big list.

1/16/2010 7:02:47 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow