 | Animation conversion toolset |
The web-ani-tools.zip package contains four separate tools for converting GIF, PNG and WebP animations.
What are animated PNG and WebP formats?
The GIF file format is widely used to encode simple animations. Because it is limited to 256 colors and cannot encode semitransparent pixels, other file formats have been designed to overcome these limitations.
Animated PNG is backward compatible with ordinary PNG and is supported by the Mozilla Firefox browser. In other browsers, only the first frame of the animation is shown.
WebP is a new file format supported in Google Chrome. In other browsers, the WebP images and animations are not displayed. Animated WebP files can use lossless or lossy compression.
How to use the tools?
The tools can be used either from command line or from Windows Desktop. In the later case, place a tool on your Desktop and then drag and drop files or folders onto it. The tool will automatically convert all compatible images to the target format and place them in the same folders as the originals.
Options
The tools accepts the following command line options:
- -r - recursively scan all sub-folders of the given folder.
- -qX - (WebP only) use lossy compression instead of the default loss-less compression. The X value sets the compression quality. Higher number means higher quality and larger files, lower number means lower quality and smaller files. The range is from 1 to 100.
- -q - (APNG only) use the zopfli compression algorithm. The resulting files will be about 5% smaller, but the conversion may take significantly more time.
- -lX - (GIF only) X is a value between 0 and 255 (55 by default) and defines how to handle semitransparent pixels. Pixels more transparent than the given value are made transparent, others are made opaque.
- -bXXXXX - (GIF only) X is a color value given in hexadecimal web format. The color is used when making semitransparent pixels opaque. Default is light grey color. If just -b is used, pixels are not mixed with background.
- -e - copy modification date from the original file (in addition to the creation date, which is always copied).
- -u - do not process a file if the converted image already exist and is not older than the source file. Otherwise, files are always converted and overwritten.
- -c<output_path_template> - lets you change the output folder. More details below.
- -o<template> - customize the messages sent to the standard output. This parameter can be used to generate custom reports or to suppress all messages.
- -dX - if a .gif file with invalid frame duration is encountered, use X as the amount of milliseconds to use instead of 0. If this switch is not used, the tool will try to guess whether to collapse subsequent frames or not. If it decides to not collapse them, 100ms will be the new frame duration.
- -s - skip still (non-animated) images.
Important: always use the command line options before the files to process and use double quotes when parameters or paths contain spaces, for example:
gif2webp.exe -q80 -u "C:\My Pictures\Some GIFs"
Alternative way of setting options
Because the tool is also meant to be used from the Desktop, there is an alternative to command line switches. You can copy and rename the tool to set the options.
- gif2webp80.exe is equivalent to gif2webp.exe -q80
- gif2webpR.exe is equivalent to gif2webp.exe -r
- gif2webpU.exe is equivalent to gif2webp.exe -u
- gif2webpE.exe is equivalent to gif2webp.exe -e
- gif2webpS.exe is equivalent to gif2webp.exe -s
File-name options can be combined. For example
gif2webp80RU.exe
will use lossy compression with quality of 80, process all sub-folders and skip files that were already converted.
Customizing output folder
The tool by default places the converted files in the same folder. The -c switch can be used to change this behavior. Important: always enclose the -c switch in double quotes. For example:
"-cC:\Output\<NAME>.webp"
will put all converted files into the C:\Output folder.
"-cC:\Output\<PATH><NAME>.webp"
will put all converted files into the C:\Output folder, but also replicates the sub-folder structure (this is only useful when using -r for recursive sub-folder processing).
"-c<ROOT><PATH>converted\<NAME>.webp"
will place the converted files in a sub-folder called "converted" in each processed folder.
Customizing output
Use the -o switch to customize the text the tool sends to the standard output. For example:
"-o<SRCNAME><EN>"
writes just the names of the processed files, one on each line.
"-o<a href=<QT><SRCNAME><QT>> <img src=<QT><DSTNAME><QT> /> </a><EN>"
generates a html fragment that puts the converted image name as the source of the img tag and links to the original image.
What placeholders can be used:
- <SRCNAME> - source filename.
- <SRCPATH> - source filename with full path.
- <DSTNAME> - destination filename.
- <DSTPATH> - destination filename with full path.
- <EN> - new line.
- <QT> - quote ".
Recent comments
Show older posts
Anonymous
on February 2nd 2022
0
I'm looking for a command line switch for WEBP2GIF.exe so that when an incoming webp file does not specify 'replace' or 'combine', that the default is set to "REPLACE" rather than the current default. The faulty conversions can usually be easily spotted by doing a side by side comparison with the original webp file as there is a distinct discoloration in the gif file when viewed with Windows File Explorer.
Gioye
on November 26th 2022
0
gif to mp4 it's the only & one thing that i need but it's not here 😞 😴
kardin
on March 19th 2023
0
Question about apng2gif.exe
If my apng file has loop count = 4, when convert it to gif I want loop count = infinity - how to do it? Thanks
If you want to make changes to the file and not simply convert it as is then maybe try using the
image editor instead. - by
Vlasta on March 19th 2023
Anonymous
on August 1st 2023
0
I'm trying to get the output folder to work but to no avail.
webp2gif.exe -qX "%cd%\input" "-c%cd%\output"
Is -c<output_path_template> in the wrong place? It seems to ignore it and places the files in the input directory
nvm got, parameter needed to be prior - by Anonymous on August 1st 2023
Zyler
on November 9th 2023
0
Anonymous
on March 10th 2024
0
No source code or linux versions of these commands?
Anonymous
on October 21st 2024
0
\\cbxjxcw
on June 13th 2025
0
SPLAAT
on July 26th 2025
0
how do you make a gif
yes
jeyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yesterday
0
wtf is this stit is on my phone
gay