Convert your animated png files to animated webp files.
- cmake
- libpng
- zlib
- jsoncpp
- pip (a python package used during installation)
- The
cwebpprogram must be in your path - The
webpmuxprogram 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-pipIn apng2webp_dependencies/ execute:
mkdir 'build'
cd build
cmake ..
make
sudo make installIn apng2webp/ execute:
sudo python ./setup.py installThe 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'