[Solved] reading black and white pixels as an array from jpeg in c and c++ [closed]


Let’s suppose you run with libjpeg. You’ll allocate a buffer and then call jpeg_read_scanlines a sufficient number of times to get all of your decompressed image data into memory. You can read scanlines (rows) individually and reformat them as needed. If the image is grayscale, the RGB values will all be equal, so you can just read one of them.

Paul Bourke’s site has some pretty good usage examples of libjpeg.

2

solved reading black and white pixels as an array from jpeg in c and c++ [closed]