TGAImage question

I was playing around with the mentioned class attempting to create some textures in a demo, but I bumped into what it seems to be a bug that gives my loaded images a blueish look.
As always a picture is worth a thousand word (well maybe not a thousand ;D), so here’s what I get
http://www.realityflux.com/abba/weird%20tga.jpg
and this is what I’m expecting
http://www.realityflux.com/abba/original.jpg

Without having the faintest idea what’s really going on, I’ll say that problems of this sort are usually mixed up colour channels. Are you sure your alpha channel isn’t being used as a blue channel?

[quote]Without having the faintest idea what’s really going on, I’ll say that problems of this sort are usually mixed up colour channels. Are you sure your alpha channel isn’t being used as a blue channel?
[/quote]
I was thinking that’s what’s going on as well, but not having the necessary documentation I thought it’d save me sometime if I come up here and post about such flaw.
here’s the code that I use whoch generates the corrupted textures


      TGAImage light = null;
      try{
        light = TGAImage.read("textures/light.tga");
      }
      catch(java.io.IOException e){}
  
      gl.glBindTexture(gl.GL_TEXTURE_2D, texture);
      glu.gluBuild2DMipmaps(gl.GL_TEXTURE_2D, gl.GL_RGBA, light.getWidth(), light.getHeight(), gl.GL_RGBA,
                            gl.GL_UNSIGNED_BYTE,light .getData());

I think you might need to ask the TGAImage for the OpenGL format of the texture (TGAImage.getGLFormat()) instead of assuming that it’s GL.GL_RGBA.

[quote]I think you might need to ask the TGAImage for the OpenGL format of the texture (TGAImage.getGLFormat()) instead of assuming that it’s GL.GL_RGBA.
[/quote]
Umm I think you’re right on that one, lemmie go and make a quick check.
I might just drop the whole tga image thing because I got my custom texture loader to work, and I can convert TGAs into png via special softwares with minimal to no quality loss.