Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported TGA file #50

Closed
LautrecOfCarim opened this issue Apr 14, 2017 · 1 comment
Closed

Unsupported TGA file #50

LautrecOfCarim opened this issue Apr 14, 2017 · 1 comment
Labels

Comments

@LautrecOfCarim
Copy link

I'm having problems with one .tga file (attached), texconv.exe fails to read it. It opens normally with paint.net and I'm not sure what the problem is.

F:\DirectXTex-master\Texconv\Bin\Desktop_2017\Win32\Debug>texconv.exe bad_file.tga
Microsoft (R) DirectX Texture Converter (DirectXTex version)
Copyright (C) Microsoft Corp. All rights reserved.
*** Debug build ***

reading bad_file.tga FAILED (80070032)

F:\DirectXTex-master\Texconv\Bin\Desktop_2017\Win32\Debug>

bad_file.zip

@walbourn
Copy link
Member

I have a little utility for dumping out the header information I use for debugging purposes (found here). For your file it outputs:

TGA bad_file.tga
ColorMap Type = 1
ImageType = 1   TGA_COLOR_MAPPED
ColorMap First = 0
ColorMap Length = 256
ColorMap Entry Size = 24
Origin 0, 0
Size: 4096 by 4096
Bits Per Pixel 8
Image descriptor 00
ExtensionOffset = 0
DeveloperOffset = 0
Signature= TRUEVISION-XFILE.

As noted on the wiki the TGA reader does not support color-mapped (i.e. palette) files which are uncommon for TGA (since the main value of that format is being able to encode 24bpp images). I do have an open issue for a possible way to handle them since there are no paletted DXGI formats. See 38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants