GIF Transparency

Cabose

Active member
Joined
Oct 18, 2006
Messages
39
Programming Experience
Beginner
How can you get a transparent gif to show correctly? I am making an rpg game and i want my character to show up correctly on the background image.
any help will be appreciated.

Thanks,
Cabose
 

Blake81

Well-known member
Joined
Feb 23, 2006
Messages
304
Location
Georgia, USA
Programming Experience
1-3
I've been using PNG files to work with transparency in VB. It seems like I had a good bit of trouble finding how to make GIFs transparent with VB, if it can be done. PNGs work pretty well, and open with just about any program, which was good for doing some GDI work in my application and then making other small changes later in Paint or some other programs. I have run into issues once where my transparent PNG showed up as all black (with the appropriate parts being transparent) in Microsoft Image Composer.
 

juggernot

Well-known member
Joined
Sep 28, 2006
Messages
173
Programming Experience
Beginner
Oh I see your problem. A transperant Gif IS actually tranpserant. If you set a backrgound color on your picturebox, your image will blend right into it, perfect transperency. However, the background image/color of your picturebox is not transperant, and will cover things beneath it. How is your game set up, is the entire map on picture or are you using some kind of grid? If you were using a grid, you might be able to find a way to change the 'character's' backround image to the image of the picturebox underneath him. This would work, but to me it does seem like a hard way to accomplish something that should be simple.

PS- I tried it out, and gifs and pngs have the same problem.
 
Top Bottom