Image files fully transparent during conversion
Posted: Fri Oct 04, 2024 8:58 pm
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.
Thanks for your time,
-Xavier
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.
Thanks for your time,
-Xavier