How to change and image transparency

Hi,

I wanna create a splashscreen/logoscreen when i start my game.
And i want to be able to change the transparency values of my logo so it fades into focus starting at being invisible (fully transpatrent?) to visible (no transparency) over a certain period of time (i’m thinking to just use a counter?).

the way i pain my logo onscreen now is this:

g.setColor(Color.white);
g.fillRect(0, 0, 480, 800);
g.drawImage(splashscreenlogo, 0, getHeight() / 3, this);

So I’probably wanna have a for loop run over my g.drawImage function, and set the transparency values within this loop,but i have no idea how i set the transparency values of my image.

Can anyone help?

This link should show you all you need to know :slight_smile:
Next time try and fire up old google, that was the first thing that popped up when I searched “java2D transparency”.

http://www.informit.com/articles/article.aspx?p=26349&seqNum=5

This is what i was looking for!

TY

yeah i searched around, on different sites (google included), but couldnt find what i was looking for…

Slyth2727’s link looks good.

Here is where I first learned how to do this, from a JGO post by StumpyStrust:

There are a bunch of nifty suggestions there, including resizing/scaling, in addition to the info about changing transparency levels.