Bug 416506 - Opening .tga files only shows alpha channel while the rest of the image shows up as transparent.
Summary: Opening .tga files only shows alpha channel while the rest of the image shows...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.2.8
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-20 17:27 UTC by fr0ztylele
Modified: 2020-04-02 13:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fr0ztylele 2020-01-20 17:27:51 UTC
SUMMARY
A simple .tga file only shows the alpha layer when opened up in the program. However, looking at the preview image of it in "Latest documents" it shows up correctly. 

STEPS TO REPRODUCE
1. Open the .tga file from file explorer.

OBSERVED RESULT
Only the alpha channel is visible and teh rest is all transparent.

EXPECTED RESULT
Full image shows up without transparency.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 vanyossi 2020-01-20 18:24:46 UTC
Setting to confirmed.

All 32bit vesion tga files from http://netghost.narod.ru/gff/sample/images/tga/index.htm load as sinlge alpha channel
Comment 2 vanyossi 2020-01-20 18:25:41 UTC
For to m ention consolose shows

WARNING: TGA image with 32-bit pixel size reports absence of alpha channel. It is not possible, fixing...
Comment 3 vanyossi 2020-01-25 03:01:11 UTC
Please do not change the status of the bug. ASSIGNED means it is confirmed and someone has taken the responsability of fixing it :)
Comment 4 fr0ztylele 2020-01-25 08:35:59 UTC
(In reply to vanyossi from comment #3)
> Please do not change the status of the bug. ASSIGNED means it is confirmed
> and someone has taken the responsability of fixing it :)

My bad, was unsure if you could change the status directly and saw your message about setting it to confirmed.
Comment 5 vanyossi 2020-03-25 15:00:29 UTC
Git commit fef2daaf0252bbc08bbecc00fac8fb5c82ec63b1 by Ivan Yossi.
Committed on 25/03/2020 at 14:59.
Pushed by ivany into branch 'master'.

Convert tga to 24bit if there is no alpha data

Some targa 24bit images are saved as 32bit for load efficiency.
    There is no specification to signal this in the header so we have
    to check there is indeed some data in 32bit alpha channel to
    avoid opening the image as full alpha.

M  +14   -2    plugins/impex/tga/kis_tga_import.cpp

https://invent.kde.org/kde/krita/commit/fef2daaf0252bbc08bbecc00fac8fb5c82ec63b1
Comment 6 Halla Rempt 2020-03-26 12:58:37 UTC
Git commit 89699929dd94549931a9b7f8ef4f16bfb7a75002 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 26/03/2020 at 12:58.
Pushed by rempt into branch 'krita/4.2'.

Convert tga to 24bit if there is no alpha data

Some targa 24bit images are saved as 32bit for load efficiency.
    There is no specification to signal this in the header so we have
    to check there is indeed some data in 32bit alpha channel to
    avoid opening the image as full alpha.

M  +14   -2    plugins/impex/tga/kis_tga_import.cpp

https://invent.kde.org/kde/krita/commit/89699929dd94549931a9b7f8ef4f16bfb7a75002
Comment 7 Halla Rempt 2020-04-02 13:34:31 UTC
Git commit 13c35e60cfc92f3b8acae4a310ea2d0d81b90f63 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 02/04/2020 at 13:09.
Pushed by rempt into branch 'krita/4.3'.

Convert tga to 24bit if there is no alpha data

Some targa 24bit images are saved as 32bit for load efficiency.
    There is no specification to signal this in the header so we have
    to check there is indeed some data in 32bit alpha channel to
    avoid opening the image as full alpha.

(cherry picked from commit fef2daaf0252bbc08bbecc00fac8fb5c82ec63b1)

M  +14   -2    plugins/impex/tga/kis_tga_import.cpp

https://invent.kde.org/kde/krita/commit/13c35e60cfc92f3b8acae4a310ea2d0d81b90f63