How to update libpng version in opencv

Iam installed the opencv 2.4.13.6 32bit c++ version. when load the image by using cvLoadImage() function getting error like libpng error: read error.

please, no screenshots of code or errors here, thank you …

then, 2.4.x is deadbeef, no more maintained, end of life a decade a go already …

you MUST not build new programs on something that outdated.
(or dare to use the opencv 1.0 C-api, it’s all DEAD, DEAD, DEAD.)

please, update to recent 4.8 or so, and learn the modern(already 20 years old…) C++ API, here’s docs

which version of opencv have 32bit(x86) and v14 version is available

Iam tried opencv3.0 same error like libpngerror: read error

4.2.0 still has vc14 libs (no idea, if there are 32bit binaries):

probably best idea is to build from src for such an outdated box …

how to update libpng version in opencv

How to update libpng version in opencv

donwload libpng and compile it
give path to new png lib to cmake when you build opencv

In opencv source code iam edit the cmakelist.txt in that file where give path of libpng library. please find the attachments

In the image where iam marked that to be edit or not