Using alpha with Graphics.drawImage
Colorkeyed sprites in my game go through the following steps:
- Loading the image from getImage
- Running through a filter I made, ColorKeyFilter, which just sets all pixels of the specified color key with an alpha value of 0
It seems to work fine, but sometimes there is flicker where they fail to draw at all. It's very rare that it dosen't draw but sometimes it happens. Additional poking and prodding later I found out that drawImage returns false every time when rendering an image I set an alpha on, even if it appears ok.
I found that if I don't use ColorKeyFilter to set an alpha value then everything is beautiful (except for the fact that nothing is color keyed of course). drawImage returns fine, and there is no occasional flicker.
Should I just use .gif and it's transparency feature or something?
Also I'm quite new to java graphics programming, how would I go about making a blank image using an indexed color model, and specifying the transparent color?
I'd like to make it load indexed png files eventually. gif is evil.

