TGA support to improve ?

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
fourchette
Posts: 4
Joined: Thu Jun 25, 2015 9:23 am

TGA support to improve ?

Post 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
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: TGA support to improve ?

Post by xnview »

could you send me the tga files?
Pierre.
fourchette
Posts: 4
Joined: Thu Jun 25, 2015 9:23 am

Re: TGA support to improve ?

Post 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 ?
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: TGA support to improve ?

Post by xnview »

yes it's a 32bits tga
Pierre.
fourchette
Posts: 4
Joined: Thu Jun 25, 2015 9:23 am

Re: TGA support to improve ?

Post 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 ?
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: TGA support to improve ?

Post by xnview »

you can desactivate 'use alpha channel' in XnView, i can't remove alpha channel support else others users will complain too :)
Pierre.
fourchette
Posts: 4
Joined: Thu Jun 25, 2015 9:23 am

Re: TGA support to improve ?

Post 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 :)
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: TGA support to improve ?

Post by XnTriq »

Post Reply