Mobile app version of vmapp.org
Login or Join
Alves908

: Animated GIFs contain distorted colors but static GIFs with the same content are fine What I am doing I'm capturing short animated 600x300 GIFs to use on a web site to showcase the functionality

@Alves908

Posted in: #AnimatedGif #Colors

What I am doing

I'm capturing short animated 600x300 GIFs to use on a web site to showcase the functionality of a desktop Windows application. What I do specifically is:


Use Camtasia Recorder (v7.1) to record.
Use Camtasia Studio (also v7.1) to produce to GIF using a custom production preset (options: GIF, 256 colors, frame rate 10, optimized palette, dithered color reduction OFF, Windows colors OFF, all other options are default)


Problem

What I see in the resulting output is that some colors are very different from the original. For example, note the pinky background in pop-up menus shown in this draft GIF:



However, when saving a static screenshot of a pop-up menu using a 256-color GIF, this isn't a problem, and based on my perception, the color of the pop-up background is perfectly preserved:



Sometimes, this problem doesn't show up and the resulting GIFs provide decent colors. More often than not however, I'm facing these problems on this machine, which is a Windows 7-upgraded-to-Windows 10 desktop.

The same procedure on a number of other machines seems to work just fine.

The application where the GIFs are being captured is Microsoft Visual Studio 2013 with JetBrains ReSharper.

If my understanding is correct, GIFs allow 256 colors per frame, and this seems to be more than enough if we're talking about static GIFs.

Any idea what might be going on during GIF production that results in this color distortion?

Any stupid, trivial detail that I'm missing?

Thanks

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves908

1 Comments

Sorted by latest first Latest Oldest Best

 

@BetL925

GIF images by nature cannot display all the colors. They have a color table with 256 entries. If you have more than 256 colors in your source, the color table fills up. The software used to create the GIF has to use heuristics to create a good color table for your image.

In your case it appears that the gray for the background of the popup menu is not getting into the color table in some cases. When this happens the software chooses the closest possible match from the color table which may have an off shade such as pink to it.

I'm not familiar with the particular software you are using, but there may be different algorithms you can choose from for color table selection. You also may be able to set the color table ahead of time. For example export the color table from one of your videos where it looks good and use that color table when creating the GIF. You might also be able to lock a few key colors such as the Various grays and blues that are common on your Windows desktop so that they will always be present in the color table.

See also: Can I have an animated GIF with more than 256 colours per frame?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme