It is currently Sat Jun 29, 2024 4:34 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: 24 bit TGA
PostPosted: Thu May 02, 2013 11:07 am  (#1) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
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>


Attachments:
TempFile.7z [10.96 KiB]
Downloaded 129 times

_________________
Image
Fantasy Cartography and Mapping by RobA
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: 24 bit TGA
PostPosted: Thu May 02, 2013 12:10 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
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?


Top
 Post subject: Re: 24 bit TGA
PostPosted: Thu May 02, 2013 12:36 pm  (#3) 
Offline
Script Coder
User avatar

Joined: Nov 06, 2012
Posts: 239
Location: Italy
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.

_________________
Gino D's GIMP scripts: https://sites.google.com/site/ginodonig/gimp-scripts


Top
 Post subject: Re: 24 bit TGA
PostPosted: Sat May 04, 2013 4:26 am  (#4) 
Offline
Script Coder
User avatar

Joined: Nov 06, 2012
Posts: 239
Location: Italy
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.

_________________
Gino D's GIMP scripts: https://sites.google.com/site/ginodonig/gimp-scripts


Top
 Post subject: Re: 24 bit TGA
PostPosted: Sat May 04, 2013 10:48 am  (#5) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Okay. So is this a bug then? All my other graphic programs open that TGA fine...

-RobA>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: 24 bit TGA
PostPosted: Sat May 04, 2013 12:50 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Nov 06, 2012
Posts: 239
Location: Italy
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.

_________________
Gino D's GIMP scripts: https://sites.google.com/site/ginodonig/gimp-scripts


Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group