4

I've noticed more and more sites using animated GIFs that have PNG quality. You'd think they're the latter if you didn't check the image info. The lines are crisp, the colors look great, there's none of that slight-but-still-noticeable graininess that GIFs get. How are people accomplishing that? I'm not a graphics designer but I'm curious and I'd like to create such animated GIFs that have no recognizable loss in quality compared to GIFs. (I use GIMP but I do have access to Photoshop, if required.)

UPDATE: Here's an example. http://codyhouse.co/gem/smart-fixed-navigation/

  • Are you certain they are gifs? You can animate PNGs via jQuery or javascript. – Scott Jan 28 '15 at 21:38
  • Yes, I checked the file extensions. – CodeCharming Jan 28 '15 at 22:12
7

I think the animated gifs are a good beneficiary of flat design. If you have a limited number of colours, and you do not use gradients you don't need to use dithered patterns.

We are used to see this patterns becouse a lot of people use real video segments as avatars, etc. But in this case you have just some colours, lets say 20 and you have at your disposal 235 aditional colours to make the look smooth.

Here is the palete used on that particular gif.

A colour palete

I re-arranged the palete, so you can notice the more saturated colours, and the vast array of soft colours that make the aliased part of the shapes and the shadows.

The other thing is the high frame rate. That example has a frame rate of 375 frames in about 11-12 secs, that means that the framerate is like 30 fps, the same as a normal video.

To prepare a good palete:

The principles are the same regardless of the program you use.

1) Put all the elements you use in the entire animation in one canvas. Convert this canvas into 8 bit image, without any dithering, with an optimized or adaptive palete.

2) If you don't get a specific colour, for example a clean red for the little dot, make that shape bigger, so the program gives more importance to that part of the colour palete.

3) Extract that palete and force your original animation to use that controled palete.

A way to arrange objects to extract a common palete

Edited.

Probably the best program to do this kind of animation is After Effects, and Flash, which can export it directly to animated gif. (Other animation software can be used of course)

But I'm posting some free programs (win) than can achive simmilar results, but with some extra steps.

The animation

http://vectorian.com/ This is a free software for windows similar to flash. But as it only can save to swf file we need one aditional tool: http://www.pizzinini.net/projects/swf2avi/ And export a sequence of bmp files.

And, with the proper materials we can use http://www.blender.org/ to achive plain colors.

An intermediate step. Convert to video

You can use individual files to make an layered animation in gimp or photoshop. But you can automate the process by transforming them into a video if you have a lot of frames.

You can use http://www.virtualdub.org/

The conversion to gif

There is an abandonware that you probably can find Microsoft Gif Animator, verey usefull and can convert from avi to gif, with the option of aplying no dither.

But there are several free programs out there to convert from video to gif. I have not properly test them so I am not making any recomendation yet.

I will post some after some testing.

Photop Paint from Corel Can Process an avi file into animated gif directly.

  • Thanks. I agree, flat design is naturally suitable for making animated GIFs. I tried make a simple animated flat color bar chart (blue bars, black axes) with a chart title but the text came out with grainy edges and the bar color seemed a slightly different shade of blue. On the other hand, this GIF (by the same artist no less) uses overlapping colors, text, the whole shebang and God it looks beautiful. dribbble.com/shots/1541960-Med-Use – CodeCharming Jan 28 '15 at 23:29
  • What do you mean by putting all the elements in one canvas? Since I use GIMP, does that refer to a layer? How would I then use those elements to create the final animation? – CodeCharming Jan 28 '15 at 23:31
  • Let me prepare a more detailed example. – Rafael Jan 29 '15 at 0:25
  • One more detail to note is that each frame in a GIF animation can have it own separate 256-color palette. One way to make use of that feature is that, if the color scheme in your animation changes halfway through, like in the example animation linked above, you could prepare the segments of the animation separately and then join them together using a GIF processor like GIFsicle. – Ilmari Karonen Jan 29 '15 at 14:03
  • Also note that a 30 fps frame rate is high enough that at least some versions of IE will not run that animation at its intended speed. It may not matter much in this case, but if you need to ensure a consistent animation speed between browsers, the highest safe frame rate appears to be 16.67 fps (= 60 ms frame delay). – Ilmari Karonen Jan 29 '15 at 14:09
0

For the colors, we can't do anything except limited ~256 colors.

But for the pixelated edges you can:

Make it at @3x and reuse it at @1x in HTML

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.