Switch to full style
Ask all general Gimp related questions here
Post a reply

24 bit TGA

Thu May 02, 2013 11:07 am

GIMP Version: 2.6.11
Operating System: Windows
OS Version: XP - SP3
GIMP Experience: Advanced Level

List any relevant plug-ins or scripts:
None

List any ERROR messages you received:
None



I am trying to open a 24 bit TGA greated by a different program (hq4x enlarger) in gimp, and it shows up as a blank layer.

Any suggestions?

Attached is a sample. Is there something wrong with the image? It shows fine is faststone.

-Rob A>

Re: 24 bit TGA

Thu May 02, 2013 12:10 pm

Maybe trying to save it as uncompressed 32-bit will help?
All I'm getting in GIMP is a blank transparent layer, but obviously file isn't corrupt
for it opens fine in PS and Illustrator.
You indicated it as 24-bit, maybe missing alpha channel is the problem?

Re: 24 bit TGA

Thu May 02, 2013 12:36 pm

There seems to be an oversight in the way GIMP recognizes and reconstructs the alpha channel of this particular TGA file, by making the layer totally transparent instead of keeping it totally opaque, as I suppose it must be.

So this problem can be fixed by operating like this.

  • Select "Layer -> Mask -> Add Layer Mask..."
  • Among the "Initialize Layer Mask" options, choose the "Transfer Layer's alpha channel" one.
  • Select "Layer -> Mask -> Delete Layer Mask."

This way, the original content of the image will be correctly retrieved and displayed.

Re: 24 bit TGA

Sat May 04, 2013 4:26 am

Rob, another (and more simple) trick for unveiling the hidden content of the image layer is to employ the Levels tool, where you will have to select the Alpha channel and move the left slider of the "Output Levels" section all the way to the right, that is to 255, so as to completely eliminate the transparency.

Re: 24 bit TGA

Sat May 04, 2013 10:48 am

Okay. So is this a bug then? All my other graphic programs open that TGA fine...

-RobA>

Re: 24 bit TGA

Sat May 04, 2013 12:50 pm

RobA wrote:Okay. So is this a bug then? All my other graphic programs open that TGA fine...

Yes, I think it would be worth reporting this issue as a bug at GNOME Bugzilla, since the TGA format (contrary to what imagined until recently) still proves to be an important and most used extension in the world of computer graphics:
http://en.wikipedia.org/wiki/Truevision_TGA

Although I am not very experienced in reading and handling the GIMP source code, however I have the impression that the "file-tga-save" procedure must be affected by some flaw causing the program to misinterpret the alpha channel information of certain TGA files like the one you posted, where most likely this channel's values are improperly inverted.
Post a reply