FLIF-hub / FLIF

Free Lossless Image Format
Other
3.72k stars 229 forks source link

Building without libpng #402

Open sveinbjornt opened 7 years ago

sveinbjornt commented 7 years ago

Any chance of building without linking to libpng?

lehitoskin commented 7 years ago

Removing libpng would remove encoding/decoding PNGs

jonsneyers commented 7 years ago

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.