Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

  • Staff
19 hours ago, MikhailPo said:

Hello.

I was tested exporting to TGA format with Alpha channel in version 1.7.3 and had some problems with it.

TGA header has information about bytes per pixel equals 4, but ImageDescriptor field hasn't any information about bits for alpha channel (it is equals 0). With it some programs can't open exported TGA files :(

File format reference - https://www.fileformat.info/format/tga/egff.htm#TGA-DMYID.2

 

Hi MikhailPo,

What applications are failing to open Affinity exported TGA files?

Link to comment
Share on other sites

22 hours ago, Sean P said:

Hi MikhailPo,

What applications are failing to open Affinity exported TGA files?

Hi Sean,

It's inner software in my company. It was created across TGA documentation and works well with TGA files exported from Gimp and Photoshop.

In other viewers it works fine (Photoshop, Gimp, Blender, MacOS default viewer, etc.).

I can acquire request for modification our soft but I think that better for Affinity is support TAG format correctly.

Example in attachments:

demo1.tga Header(hex) 00 00 02 00 00 00 00 00 00 00 00 00 31 00 31 00 20 20 (Affinity Photo)
demo2.tga Header(hex) 00 00 02 00 00 00 00 00 00 00 00 00 31 00 31 00 20 08 (Photoshop, no RLE compression)
demo3.tga Header(hex) 00 00 02 00 00 00 00 00 00 00 31 00 31 00 31 00 20 28 (Gimp, no RLE compression, origin top-left)
demo4.tga Header(hex) 00 00 02 00 00 00 00 00 00 00 00 00 31 00 31 00 20 08 (Gimp, no RLE compression, origin bottom-left)

As you see last 4 bits (0x0F) have information about alpha channel size (8).

demo4.tga

demo3.tga

demo2.tga

demo1.tga

Edited by MikhailPo
Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...
  • 4 months later...
  • 3 months later...
  • 10 months later...

Hi,

I'm running into a small inconvenience with the TGA export. I'd like to use Affinity Photo for editing Quake 3 textures, because TGA is the only format that Quake 3 can use for textures with alpha channels.

The texture loads correctly in-game, but the game's console prints the following warning:

"WARNING: '[path to texture]' TGA file header declares top-down image, ignoring

I can fix this by exporting the TGA from Gimp instead. During export, Gimp lets me choose between Bottom left and Top left for the Origin setting. The error goes away when I use Bottom left.

You can find the code section in Quake 3's source code that's related to TGA rendering here, starting in line 1121. The error message is in line 1354. Maybe this is helpful in some way.

Link to comment
Share on other sites

  • Staff

@Sersch

Welcome to the Serif Affinity forums :) 

That's very helpful thank you

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.