How do I read JPEG and PNG pixels in C++ on Linux?

后端 未结 9 2355
北荒
北荒 2020-12-04 18:34

I\'m doing some image processing, and I\'d like to individually read each pixel value in a JPEG and PNG images.

In my deployment scenario, it would be awkward for me

9条回答
  •  执笔经年
    2020-12-04 18:57

    Unfortunately, jpeg format is compressed, so you would have to decompress it before reading individual pixels. This is a non-trivial task. If you can't use a library, you may want to refer to one to see how it's decompressing the image. There is an open-source library on sourceforge: CImg on sourceforge.

提交回复
热议问题