PDA

View Full Version : ADD AN ALPHA CHANNEL TO MY IMAGE! HOW?



robert_s
11-23-2001, 06:55 AM
HI!
Do you think guys if I just open my .bmp image in photoshop and save it as .tga (32 bits) then the program will automatically add the alpha channel for me to the newly created TGA which I want to use it?
If not.. then how do I add it using Photoshop ver. 6!
Is it the one Image/Mode/8 bits channel
or I am wrong?
I need to stretch the whole image over my whole screen and have some parts of the image transparent so, that I can see through and therefore I need the alpha channel. I tried this with .bmp image which I was able to blend so the whole image went transparent but thats not what I want! I want only certain parts of that image to be completely transparent and others not at all!
As far as I know .bmp hasn't got the alpha channel and I can't add it.
Thanks!

Bob
11-23-2001, 07:29 AM
Isn't this more or less the same question you asked on the advanced board last week or so? My answer wasn't enough? I think I got pretty much everything you need to know in there...

UrbanLedgend
11-23-2001, 10:45 AM
Obviously Not Bob, probably wants code http://www.opengl.org/discussion_boards/ubb/tongue.gif

UrbanLedgend
11-23-2001, 10:47 AM
BMP format does not have alpha http://www.opengl.org/discussion_boards/ubb/rolleyes.gif It pure RGB so theres is no way to add alpha withhout converting to another format that supports alpha

Geniuz
11-23-2001, 04:24 PM
http://nehe.gamedev.net/tutorials/lesson20.asp
?

MrShoe
11-23-2001, 07:04 PM
What you can do with BMPs is simply in your loader fuction give all teh black coloured pixels of the texture and alpha value of 0 and the rest 1.0, that way the image is transparent where there is a black colour... That is what i did for my flight sim for tree billboards... you can adapt this technique in many ways

Platinum
11-23-2001, 07:43 PM
My way of achieving the effect is to make two pictures. One with color image and other with black and white "alpha". And just read them together and from the "alpha"image make the alpha channel. It is not as fast (only while reading) as reading just one file, but it works.

robert_s
11-24-2001, 01:52 AM
!! wow!! It works!! ok!! sorry!! thanks all!!
Bob yes you're right! I posted exactly the same question to gamedev coze I still could not work it out! till last night!!!
http://www.opengl.org/discussion_boards/ubb/smile.gif