Convert GIF, PNG and WebP animations

Log-in or register.
PAD/ani-conv-64.png image

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 all comments
user icon Anonymous on April 18th 2023

WSP MY GID HOMMIEEE

user icon Anonymous on May 11th 2023

:-) :-D wow si

user icon Anonymous on August 1st 2023

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

user icon Anonymous on August 1st 2023

nvm got, parameter needed to be prior

user icon Anonymous on September 9th 2023

I LOVE KARL

:-o :-o :-o :-o

user icon Zyler registered user on November 9th 2023

how do you make a gif

user icon Anonymous on February 8th

how to make animate cursors? :-(

Bruh

user icon RIDDLER registered user on March 7th

:-) NEW. :-)

:-) Love this. :-)

user icon Anonymous on March 10th

No source code or linux versions of these commands?

user icon Anonymous on March 18th

Wow ;-)

user icon Anonymous
What about ICL files?
Vista & Win 7 icons
I wish there were...