On Tue, Dec 16, 2008 at 12:03 AM, Andrew R. <for...@gimpusers.com> wrote:
> I have a problem. I am making flash games but there is a 10 meg limit on the 
> total size of the game I can make. In order to do what I want i need to 
> compress my sprites as much as can be done. I am using PNG files.
> I have in the past I have reduced the number of colors and removed the alpha 
> layer and used only one transparent color.
> What I want to do now is reduce the number of colors like before but also use 
> a alpha layer. This reduction of colors really helps reduce the size of the 
> sprite and after I put it though PingOUT I really get a smaller size. However 
> I want to reduce the number of colors in the alpha layer and keep the color 
> set to RGB. I've been using the index color option and then set it back to 
> RGB color. This works file for the picture but it does nothing to the alpha 
> layer. I have tried using posterize on the alpha layer. It does reduce the 
> total file size but not by much. In the past I have found that postersize 
> does not reduce the number of colors saved in the index. It only makes it 
> look like there are fewer colors. I have tested this much and it does store 
> many colors many of which are the same.
> I have tried my best to reduce the number of colors in the alpha layer but to 
> no luck. If I could reduce the number of alpha colors I could really make a 
> good looking sprites for my game.

This is pretty easy.

For binary dithering of the alpha channel:
 1. There is an option 'dither transparency' when converting to
indexed which will dither the alpha channel.

For dithering or quantizing the alpha channel to N levels:
 1. Add a layer mask with the option 'transfer layer's alpha channel'
 2. Copy and paste it as a new image,
 3. Indexize it to N colors (with or without positioned dithering, at
your option)
 4. copy it and paste it back on the original layermask
 5. apply the layer mask

PNG actually supports indexed images with full 8bit alpha channel. If
Flash supports that, it could be worth your while to look into.

Gimp-user mailing list

Reply via email to