0

I need some help doing the following in C++: I have to read an image file (.bmp, .jpg, etc.) and as a result I have to form a pixel matrix in the form of an one-dimentional array. Is there a library I should use or any functions available for this purpose?

Thank you!

fanciulla
  • 175
  • 1
  • 5
  • 18
  • Answer for bmp: http://stackoverflow.com/questions/5751749/how-can-i-read-bmp-pixel-values-into-an-array For jpeg try libjpeg – OOhay May 10 '13 at 20:17
  • See http://stackoverflow.com/q/694080/10468 for JPEG and PNG. For BMP and other formats, I know the question has been asked before and answers exist on S.O. – DarenW May 10 '13 at 20:20
  • (and never mind the "on linux" part of that question - the libraries are multiplatform.) – DarenW May 10 '13 at 20:21

1 Answers1

0

There are lots of libraries available for reading images in C.

Some pointers:

Joakim Nohlgård
  • 1,832
  • 16
  • 16