PNGQuant
in package
Table of Contents
- compress() : mixed
- The PNGQuant function will automatically compress a PNG image, taking just the path as a parameter. Since it will write the file to the exact same location that your original file was located, you don't need to do any additional work to write it.
Methods
compress()
The PNGQuant function will automatically compress a PNG image, taking just the path as a parameter. Since it will write the file to the exact same location that your original file was located, you don't need to do any additional work to write it.
public
static compress( $img[, $target = null ]) : mixed
Usually we don't compress originals, to maintain a "as good as possible" copy, but apply this to thumbs and versions we generated with the rather crummy GD compression, so you can optionally pass a second parameter to write to a different file.