0

First, I am trying to compress png images using https://pngquant.org/, but I didn't know how to download it on Apache server (Windows). The browser hits an error that pngquant is not installed on server (xampp). How do I do that?

Second, do I have to do this:

$command = "find . -name '*.png' -exec pngquant --ext .png --force 256 {} \;";
shell_exec($command);

after this code here https://pngquant.org/php.html ?

I've never used command line in PHP. Thanks.

4

1 回答 1

2

as i checked out "https://pngquant.org/php.html" where it is telling that pngquant library is available in linux so not sure about window so let me put the list of procedures how will it work

1) try to find out the dll library(which supports in window) for pngquant if available then put this library in extension folder which is located inside php folder (not exactly sure about the path please figure it out) then it will work perfectly

explanation : pngquant is php extension which must be available inside extension folder as a dll library then it will work perfectly in windows

于 2015-10-05T14:40:30.133 回答