Page 1 of 1

TGA support to improve ?

Posted: Thu Jun 25, 2015 9:33 am
by fourchette
Hello,



reproduced with both xnview 2.03 (May 29 2013) and xnviewMP Version 0.72 x64 (Dec 19 2014). the behavior is the same.


There are some TGA files that I can open with Photoshop, Apple Preview and TGA viewer (http://tgaviewer.com/) that when i try to open them in xnview/xnviewMP are simply blank. As if the image was filled with transparent values.


Bellow are links to such TGA files. They are generated by a thrid party program (capture of HDMI 1080p60 stream).

I am guessing they used a somehow more liberal use of TGA file format that the current paint.net TGA implementation does not correctly understand.

Whereas photoshop (and other) maybe implement the complete TGA specification.


Can it be fixed in xnview/xnviewMP somehow ?

thanks

fourchette



http://speedy.sh/BG7...titled-01-12.7z
http://demo.ovh.eu/d...titled_01_12.7z

Re: TGA support to improve ?

Posted: Thu Jun 25, 2015 12:14 pm
by xnview
could you send me the tga files?

Re: TGA support to improve ?

Posted: Thu Jun 25, 2015 3:10 pm
by fourchette
mmm links seem broken indeed

i have sent you the image through email (those displayed in the about xnview dialog box)

Hope it will do the trick.

could it be related to alpha channel for tga files ?

Re: TGA support to improve ?

Posted: Thu Jun 25, 2015 3:24 pm
by xnview
yes it's a 32bits tga

Re: TGA support to improve ?

Posted: Fri Jun 26, 2015 8:45 am
by fourchette
for the record, it seems that the app that generates such TGA Files incorrectly sets the alpha value of each pixels to full transparent instead of full opaque

for instance removing the alpha channel with imageMagic does the trick (tested with cygwin)

Code: Select all

convert -alpha off does_not_shown_in_xnview.tga   works_in_xnview.tga
and then the image does display fine in XnView

I beleive it is a bug on their side and not something related to XnView since XnView does show the image as it actually is with all pixels full transparent. So I have contacted the editor of this software to get their bug fixed.

However the "user experience" (feedback i got) is the other way around : "XnView sucks because the TGA file opens fine with Photoshop" :(

XnView is a viewer, so it becomes useless if an image can't be seen. Therefore, wouldn't it make sense to implement a rule upon loading images such as "if all pixels in the image are fully transparent, then I would be better ignoring the alpha channel entirely because the image wont be viewable for the user anyway"
and do that for any image format supporting alpha ? (not just TGA) with a toggle in the setting to enable/disable this rule ?

what do you think ?

Re: TGA support to improve ?

Posted: Fri Jun 26, 2015 11:43 am
by xnview
you can desactivate 'use alpha channel' in XnView, i can't remove alpha channel support else others users will complain too :)

Re: TGA support to improve ?

Posted: Fri Jun 26, 2015 11:59 am
by fourchette
found it in the settings. thanks.

i still believe that most "regular users" (typically my mum), would complain such a file does not "work" with xnview while it just works with <<insert name of another crap imaging software>>.
Such a user not know that by clicking that option burred in the xnview setting, the issue vanishes.

Besides, I do not suggest to remove alpha support at all. I need it (and would complain too :p).

I merely think that by implementing a logic based on the content of the image (ignore alpha channel when it's hiding the picture), we could avoid such a scenario without annoying anyone.

But anyway, it's a suggestion, nothing else. After all, my problem is solved :)

Re: TGA support to improve ?

Posted: Sat Aug 22, 2015 8:15 am
by XnTriq