8-bit TGA "Targa Type 2"

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
Kull
Posts: 6
Joined: Thu Jan 27, 2022 3:44 pm

8-bit TGA "Targa Type 2"

Post by Kull »

I'm working on a mod for an old game (Call to Power 2) in which all the graphics are uncompressed, RGB, 8-bit TARGA Type 2 TGA. At even the most basic level (open file and then save), XnView MP alters the file from 8-bit to 24-bit.

The question is, how does one retain the 8-bit setting?
User avatar
xnview
Author of XnView
Posts: 46257
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 8-bit TGA "Targa Type 2"

Post by xnview »

could you send me an example?
Pierre.
Kull
Posts: 6
Joined: Thu Jan 27, 2022 3:44 pm

Re: 8-bit TGA "Targa Type 2"

Post by Kull »

Hi Pierre - Thanks for your kind offer to look into the issue. I've attached one of the graphic files from the game. Open the file in XNView MP and then just save it (or "save as" so you have the original as a comparison), and you'll see the "bit depth" has changed from 8 to 24. It would be greatly beneficial if there was a way to specify the bit depth AND retain the "Targa 2" type. I mention that because other programs offer the 8 bit option, but that changes the type to "Targa 1", which is equally unusable by the game engine.
Attachments
updg64b.zip
(34.03 KiB) Downloaded 24 times
User avatar
xnview
Author of XnView
Posts: 46257
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 8-bit TGA "Targa Type 2"

Post by xnview »

this image is RGB 16bits packed, so loaded as RGB
Pierre.
Kull
Posts: 6
Joined: Thu Jan 27, 2022 3:44 pm

Re: 8-bit TGA "Targa Type 2"

Post by Kull »

When you look at the file properties in the XNView browser, it is 8 bits:
Before saving in XNView.JPG
Before saving in XNView.JPG (25.88 KiB) Viewed 4583 times
Kull
Posts: 6
Joined: Thu Jan 27, 2022 3:44 pm

Re: 8-bit TGA "Targa Type 2"

Post by Kull »

If you simply open that file in XNView and save it (doing nothing else to it), the number of bits changes:
After saving in XNView.JPG
After saving in XNView.JPG (26.28 KiB) Viewed 4582 times
I was hoping to use XNView to edit files and save them in the 8-bit format, but when saving TGA files, the only selections available under "options" are check boxes for "RLE Compression" and "Bottom-up Orientation". Can "bit size" be added as a selectable option? Or is there some other way to do that?
User avatar
xnview
Author of XnView
Posts: 46257
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 8-bit TGA "Targa Type 2"

Post by xnview »

Kull wrote: Mon Feb 14, 2022 3:12 pm When you look at the file properties in the XNView browser, it is 8 bits: Before saving in XNView.JPG
It's a flase information, it's 24
Pierre.
Kull
Posts: 6
Joined: Thu Jan 27, 2022 3:44 pm

Re: 8-bit TGA "Targa Type 2"

Post by Kull »

Well, something has certainly changed. Look at the image below and you can see the file size of the original (152K) has increased in the "saved as" version (234K). And the game will not display the altered file, but the original works fine. If the displayed bit size is "false information", than what is actually changing? And more to the point, can that be prevented?
File sizes.jpg
File sizes.jpg (84.22 KiB) Viewed 4524 times
User avatar
xnview
Author of XnView
Posts: 46257
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 8-bit TGA "Targa Type 2"

Post by xnview »

The original file use 16bits to store pixel, XnView expand it to 8bits per component. RGB 16bits is not supported in writing.
Pierre.
Kull
Posts: 6
Joined: Thu Jan 27, 2022 3:44 pm

Re: 8-bit TGA "Targa Type 2"

Post by Kull »

OK, thanks for the explanation, and that makes sense. I realize it's too much to ask to have this particular capability added to XNView, since the number of people who might use it are....me. LOL. Anyway, it seemed worth pursuing since even though this is a VERY old game, CTP2 is one of the rare instances where the commercial game developers made the source code available to modders, so it would be nice to be able to make extensive changes to the graphics as well. Again, I appreciate your time!
Post Reply