libheif icon indicating copy to clipboard operation
libheif copied to clipboard

Cannot load PNG because libpng support was not compiled.

Open gitlabspy opened this issue 2 years ago • 3 comments

Apple M1 Pro. Follow the installation instructions, and try to run examples ./heif-enc to convert png to heif and get error Cannot load PNG because libpng support was not compiled. pkg-config can locate libpng.

gitlabspy avatar Aug 02 '22 06:08 gitlabspy

brew install libpng and build libheif after tha or install libheif itself with homebrew will do the job.

bigcat88 avatar Aug 02 '22 22:08 bigcat88

Errors pop after brew install libpng, it seems to be m1 version of brew 's problem? libpng installed properly.

$ pkg-config --list-all 
libde265     libde265 - H.265/HEVC video decoder.
libpng       libpng - Loads and saves PNG files
libpng16     libpng - Loads and saves PNG files

gitlabspy avatar Aug 04 '22 06:08 gitlabspy

Errors pop after brew install libpng, it seems to be m1 version of brew 's problem? libpng installed properly.

Try brew reinstall libheif then. Are you using Monterey? I didn't test it on Big Sur, but for me on Monterey it works fine.

bigcat88 avatar Aug 04 '22 11:08 bigcat88

Is this solved? Can we close it?

farindk avatar Aug 30 '22 18:08 farindk