Files
squoosh/codecs/optipng
Ingvar Stepanyan 570e604be0 optipng: switch to bundled zlib and libpng
Benefits:
 - newer versions of the libraries
    - zlib: 1.2.8 -> 1.2.11
	- libpng: 1.6.18beta04 -> 1.6.34
 - much fewer dependencies to install (as libs are already in optipng archive and we don't need napa)
 - much smaller build thanks to customised versions of zlib and libpng containing only APIs necessary for optipng itself: 238950 -> 177359 bytes
 - much faster build thanks to preconfigured libpng and stripped APIs: 2m15s -> 40s
 - much simpler build script: 77 -> 46 lines
2020-02-25 18:45:47 +00:00
..
2018-09-04 16:49:45 +01:00
2018-09-04 16:49:45 +01:00
2018-09-04 16:49:45 +01:00
2018-12-17 13:43:18 -05:00

OptiPNG

Dependencies

  • Docker

Example

See example.html

API

int version()

Returns the version of optipng as a number. va.b.c is encoded as 0x0a0b0c

ArrayBuffer compress(std::string buffer, {level});

compress will re-compress the given PNG image via buffer. level is a number between 0 and 7.

void free_result()

Frees the result created by compress().