FLIF icon indicating copy to clipboard operation
FLIF copied to clipboard

Building without libpng

Open sveinbjornt opened this issue 8 years ago • 2 comments

Any chance of building without linking to libpng?

sveinbjornt avatar Apr 19 '17 18:04 sveinbjornt

Removing libpng would remove encoding/decoding PNGs

lehitoskin avatar Apr 19 '17 20:04 lehitoskin

You can compile with -DFLIF_USE_STB_IMAGE and then it should build without libpng, with a built-in png reader/writer. That's what is done in the Windows build by default, to avoid the dependency.

In general it's currently a bit of a mess, there are three PNG implementations involved in the current code: stb_image and libpng (one of the two is used, depending on the above flag), plus lodepng. Lodepng is currently only used for its implementation of gzip (which we use in FLIF for metadata), but it could in principle do everything.

jonsneyers avatar Apr 20 '17 09:04 jonsneyers