please help!!!! need to add alpha channel to image

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

please help!!!! need to add alpha channel to image

Post by soconne »

I've been racking my brain trying to figure out a problem for the last few days. All I want to do is load an image, any image (jpg,bmp,ect...), and then be able to add an alpha channel to the pixel data, and put either the red,green,or blue values into the alpha channel, then set all the r,g,b values to 0. I cannot figure out how to do it or get access to the right data after loading a texture.

Could somebody please help!!!!
rt
Posts: 150
Joined: Sun Nov 30, 2003 6:54 am
Location: canada
Contact:

Re: please help!!!! need to add alpha channel to image

Post by rt »

soconne wrote:I've been racking my brain trying to figure out a problem for the last few days. All I want to do is load an image, any image (jpg,bmp,ect...), and then be able to add an alpha channel to the pixel data, and put either the red,green,or blue values into the alpha channel, then set all the r,g,b values to 0. I cannot figure out how to do it or get access to the right data after loading a texture.

Could somebody please help!!!!
take a look at the texture manipulation section in the source code for the avi reader in this thread http://irrlicht.sourceforge.net/phpBB2/ ... .php?t=927

also, take a look at the png loader source code in this thread http://irrlicht.sourceforge.net/phpBB2/ ... .php?t=517, which reads in the alpha channel from a 32bit or 24bit .png image
Post Reply