Animated .GIF Files


Tip by The Rainmeter Team

Rainmeter will not display animated .gif files by just using a Meter=Image meter. It will treat the animated gif as just a regular .gif file and display only the first "frame" of the image.

There are ways to use your animated .gif files in Rainmeter however. It requires using a tool to do some conversions on your original image, and a couple of ways to display the result so it is animated and looks just like your original in all its glory.

Let's use this animated .gif image for our example:

Get ImageMagick

This is a free utility you can GET HERE
Download and install ImageMagick.
It will by default install to C:\Program Files\ImageMagick, and add itself to the Windows PATH.

Method One: Using individual frame images (preferred)

Advantages: You can define the size and other attributes of the image(s) when they are displayed.
This may include options to size with W and H, AntiAlias, Rotate, TransformationMatrix and others.
Disadvantages: A bit more hard drive space, and a bit more CPU usage.

This method involves "deconstructing" your .gif image into separate .jpg or .png files, then displaying them one after the other in a way that creates an animation effect.

Start a Command Prompt window.

In the Command Prompt window, deconstruct your .gif file.

Use the ImageMagick tool to extract the "frames" from the .gif image into separate image files. Any output image format can be used, but if your .gif has transparency, you will need to output to .png.

The following is the format for the command line you will need:

convert -coalesce "C:\PathToInput\InputName.gif" "C:\PathToOutput\OutputName.png"

Or in this example, while in the folder with the file:

convert -coalesce "Loading.gif" "Loading.png"

This will create separate .png images for each of the "frames" in the .gif file in the current folder. The images in this example will be named Loading-0.png, Loading-1.png ... Loading-7.png. You can exit the Command Prompt window.

Create a skin like this to display the images one after the other to display the animation:

; Note - You will need to get and install ImageMagick from:
; https://imagemagick.org/script/download.php#windows

; Convert your .gif image to a "Bitmap" with the following in a cmd.exe command prompt window:
; convert -coalesce "C:\PathToInput\InputName.gif" "C:\PathToOutput\OutputName.png"

[Rainmeter]
Update=100

[Metadata]
Name=GIFFrames
Author=Rainmeter Team
Information=Displays a deconstructed .gif file (individual frames) as if it was a .gif file || Instructions: See .ini file for how to get and use ImageMagick
Version=Jan 16, 2016
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[ImageNumberCalc]
Measure=Calc
Formula=Counter % 8

[ImageMeter]
Meter=Image
ImageName=#@#ImagesFrames\Loading-[ImageNumberCalc].png
AntiAlias=1
DynamicVariables=1

Method Two: Converting a .gif to a multiple frame "Bitmap" image

Advantages: A bit less hard drive space, and a bit less CPU usage.
Disadvantages: You can not define the size and other attributes of the image(s) when they are displayed.
This may include options to size with W and H, AntiAlias, Rotate, TransformationMatrix and others.

This method involves "converting" the frames of your .gif image into a single "bitmap" file, which is then displayed with a Bitmap Meter.

Start a Command Prompt window.

In the Command Prompt window, convert your .gif file to a bitmap.

Use the ImageMagick tool to extract and combine the "frames" from the .gif image into the single image file. Any output image format can be used, but if your .gif has transparency, you will need to output to .png.

The following is the format for the command line you will need:

convert -coalesce +append "C:\PathToInput\InputName.gif" "C:\PathToOutput\OutputName.png"

Or in this example, while in the folder with the file:

convert -coalesce +append "Loading.gif" "Loading.png"

This will create a single Loading.png file like this:

Create a skin like this to display the bitmap frames one after the other to display the animation:

; Note - You will need to get and install ImageMagick from:
; https://imagemagick.org/script/download.php#windows

; Convert your .gif image to a "Bitmap" with the following in a cmd.exe command prompt window:
; convert -coalesce +append "C:\PathToInput\InputName.gif" "C:\PathToOutput\OutputName.png"

[Rainmeter]
Update=100

[Metadata]
Name=GIFBitmap
Author=The Rainmeter Team
Information=Displays a "Bitmap" made from a .gif file using ImageMagick to convert a .gif to a multi-frame bitmap image. || Instructions: See .ini file for how to get and use ImageMagick
Version=Jan 16, 21016
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[MeasureAnimation]
Measure=Calc
Formula=Counter % 8

[MeterAnimation]
Meter=BitMap
MeasureName=MeasureAnimation
BitmapImage=#@#ImagesBitmap\Loading.png
BitmapFrames=8
BitmapExtend=1

Alternative tool for creating individual frame images

An alternative to ImageMagick for extracting a .gif to individual frame files is GifFrame.exe

This is a free utility you can GET HERE
Use this utility to convert your .gif file to individual images. The images can be saved as .jpg or .png. Use .png to preserve transparency.