Gradient colours in .gif

Associate
Joined
9 Jan 2006
Posts
1,440
Location
Nottingham
hey all i have a question. i have an animated image that i want to use in my sig, it has a black to white gradient across the image. when the image is in jpg or other format, the gradient is smooth and lovely. however, when i export it as a gif (regardless of the number of colours or type of gif) the gradient is blocky and ugly.

what is the best way to ensure smooth gradients? im using fireworks and have no access to photoshop unfortunately. the image i am messing with is my lovely sig!

any indeas?

nin9a
 
There are only 256 colours available to an 8-bit GIF palette, and thus only a maximum of 256 steps available for a gradient in an 8-bit image. If you have other colour components in the image, then this means even less colours available for your black to white gradient. If you shortened the length of the gradient (e.g. to 256px) then it would look smooth; any increase means reuse of colours (in the direction of the gradient), which results in the banding effect.

There's little you can do on a image with many colours. First step would be to optimise the palette the GIF is using - ensure all the colours you need for the image are used, discarding/replacing any that aren't. You can perceptually smooth the gradient with dithering, but the result is not always desirable. Experiment with the dithering options available to you.
 
Last edited:
Back
Top Bottom