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

后端 未结 9 2360
北荒
北荒 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条回答
  •  萌比男神i
    2020-12-04 18:43

    For jpeg, there is already a library called libjpeg, and there is libpng for png. The good news is that they compile right in and so target machines will not need dll files or anything. The bad news is they are in C :(

    Also, don't even think of trying to read the files yourself. If you want an easy-to-read format, use PPM instead.

提交回复
热议问题