Image files fully transparent during conversion

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

PlanetXtreme
Posts: 1
Joined: Fri Oct 04, 2024 8:29 pm

Image files fully transparent during conversion

Post by PlanetXtreme »

I was attempting to batch convert some files from .tga to .png, and was running into some trouble. The original files were very old, so it's possible they corrupted during an unzip process here or there, but some of them did work to convert, leading me to be skeptical of this quick conclusion.
During a preview in XNConvert, the image files in question are shown to be 100% transparent. However, what is really odd is that Windows file explorer initially shows an 'accurate file preview.' As in, the files are not transparent, the colors and relevant data appear as expected. Whenever I try to load the images in software (in a web browser, in multiple tested image viewers), they also appear as 100% transparent.

" ... initially shows an 'accurate file preview.' "
Only immediately after the image is previewable in windows file explorer (so during a batch conversion process, having the output folder open in windows file explorer) do the images have 'an accurate file preview.' However, not even 10 seconds later, if I try to preview the images in another way in the file explorer (right click -> view -> extra large icons, large icons, medium icons, small icons) the images appear as if they are fully transparent again.

I think this has something to do with how the TGA files are encoded (or a possible issue with XNConvert?) - Of the images I have this issue with, none of them are supposed to have an active transparency layer (Of this group of images I want converted, some of them do have a transparent layer - and every single one with an active transparency layer is correctly converted). It's possible the layer with transparency is inverted for some images, or I'm completely wrong and completely guessing.

I have attached some .tga image files to this post. Two of them work, two of them do not - I'm not sure, if my above guess is correct, why some of them have the correct transparency layer and some do not. It could be the transparency layer was applied randomly in some process I am just totally unfamiliar with. Could be something completely different.
Only one attached image has a transparency layer that should be active. The other three should not.
ScreenshotForXNConvert_FileExplorer1.PNG
ScreenshotForXNConvert_FileExplorer2.PNG
ScreenshotForXNConvert_XNConvertPreview.PNG
ScreenshotForXNConvert_FileExplorer3.PNG
Thanks for your time,
-Xavier
You do not have the required permissions to view the files attached to this post.
User avatar
XnTriq
Moderator & Librarian
Posts: 6386
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Image files fully transparent during conversion

Post by XnTriq »

This info has been extracted with TargaImage and might be helpful in finding the problem.

Code: Select all

File: swalk_stone_l_rv6_ni.tga
File Size: 196626 bytes
PixelFormat: Format24bppRgb
Size: {Width=256, Height=256}
Format: ORIGINAL_TGA
Stride: 768
Padding: 0

HEADER: 
AttributeBits: 0
BytesPerPixel: 3
ColorMapEntrySize: 0
ColorMapLength: 0
ColorMapType: NO_COLOR_MAP
ColorMapFirstEntryIndex: 0
FirstPixelDestination: BOTTOM_RIGHT
Height: 256
HorizontalTransferOrder: RIGHT
ImageDataOffset: 18
ImageIDLength: 0
ImageIDValue: 
ImageType: UNCOMPRESSED_TRUE_COLOR
PixelDepth: 24
VerticalTransferOrder: BOTTOM
Width: 256
XOrigin: 0
YOrigin: 0

COLOR MAP: EMPTY

Code: Select all

File: swalk_stone_l_rv6_ni (1).tga
File Size: 196626 bytes
PixelFormat: Format24bppRgb
Size: {Width=256, Height=256}
Format: ORIGINAL_TGA
Stride: 768
Padding: 0

HEADER: 
AttributeBits: 0
BytesPerPixel: 3
ColorMapEntrySize: 0
ColorMapLength: 0
ColorMapType: NO_COLOR_MAP
ColorMapFirstEntryIndex: 0
FirstPixelDestination: BOTTOM_RIGHT
Height: 256
HorizontalTransferOrder: RIGHT
ImageDataOffset: 18
ImageIDLength: 0
ImageIDValue: 
ImageType: UNCOMPRESSED_TRUE_COLOR
PixelDepth: 24
VerticalTransferOrder: BOTTOM
Width: 256
XOrigin: 0
YOrigin: 0

COLOR MAP: EMPTY

Code: Select all

File: swalk_stone_l_rv6_nifa.tga
File Size: 196626 bytes
PixelFormat: Format24bppRgb
Size: {Width=256, Height=256}
Format: ORIGINAL_TGA
Stride: 768
Padding: 0

HEADER: 
AttributeBits: 0
BytesPerPixel: 3
ColorMapEntrySize: 0
ColorMapLength: 0
ColorMapType: NO_COLOR_MAP
ColorMapFirstEntryIndex: 0
FirstPixelDestination: BOTTOM_RIGHT
Height: 256
HorizontalTransferOrder: RIGHT
ImageDataOffset: 18
ImageIDLength: 0
ImageIDValue: 
ImageType: UNCOMPRESSED_TRUE_COLOR
PixelDepth: 24
VerticalTransferOrder: BOTTOM
Width: 256
XOrigin: 0
YOrigin: 0

COLOR MAP: EMPTY

Code: Select all

File: treesmall01a_s_rv6.tga
File Size: 65554 bytes
PixelFormat: Format32bppRgb
Size: {Width=128, Height=128}
Format: ORIGINAL_TGA
Stride: 512
Padding: 0

HEADER: 
AttributeBits: 0
BytesPerPixel: 4
ColorMapEntrySize: 0
ColorMapLength: 0
ColorMapType: NO_COLOR_MAP
ColorMapFirstEntryIndex: 0
FirstPixelDestination: BOTTOM_RIGHT
Height: 128
HorizontalTransferOrder: RIGHT
ImageDataOffset: 18
ImageIDLength: 0
ImageIDValue: 
ImageType: UNCOMPRESSED_TRUE_COLOR
PixelDepth: 32
VerticalTransferOrder: BOTTOM
Width: 128
XOrigin: 0
YOrigin: 0

COLOR MAP: EMPTY