Convert your animated png files to animated webp files.
- cmake
- libpng
- zlib
- jsoncpp
- pip (a python package used during installation)
- The
cwebp
program must be in your path - The
webpmux
program must be in your path
###macOS
Use Homebrew to install all the dependencies. Use easy_install
to install pip
brew install webp
brew install cmake
brew install jsoncpp
sudo easy_install pip
###Linux
sudo apt-get install libwebp-dev
sudo apt-get install cmake
sudo apt-get install libpng-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libjsoncpp-dev
sudo apt-get install python-pip
In apng2webp_dependencies/
execute:
mkdir 'build'
cd build
cmake ..
make
sudo make install
In apng2webp/
execute:
sudo python ./setup.py install
The default loop is 0
(infinity) and bgcolor is 255,255,255,255
.
You can also specify a temp dir to save the webp fram and optimized original apng.
apng2webp './input.png' './output.webp'
apng2webp './input.png' [-loop LOOP_COUNT] [-bgcolor BACKGROUND_COLOR] [-tmpdir TEMP_WEBP_DIR] './output.webp'