Bug 305135

Summary: gwenview fails to open targa files
Product: [Frameworks and Libraries] kdelibs Reporter: Mathias Homann <Mathias.Homann>
Component: kimgioAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UPSTREAM    
Severity: grave CC: cfeck
Priority: NOR Keywords: reproducible
Version: 4.9   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: targa file without alpha channel
targa file with alpha channel
strace output from trying to open a TGA in kolourpaint

Description Mathias Homann 2012-08-14 13:29:26 UTC
When I try to open a .tga in gwenview, all I get is a red X and the error "Failed to read metadata".

Reproducible: Always

Steps to Reproduce:
1. try to open a .tga file
2. observe that it does not work. error message: "failed to read metadata"
Comment 1 Mathias Homann 2012-08-31 21:10:06 UTC
as of now (KDE 4.9.0) neither digikam nor gwenview nor limoo can handle TGA images.
That is a grave lack of functionality for me since I work with TGA a lot in game content development.
Comment 2 Christoph Feck 2012-08-31 22:02:17 UTC
What I see here, is that Qt 4.8.2 provides it's own plugin for TGA loading, that does not work. Can you please check if removing file "/usr/lib/qt4/plugins/imageformats/libqtga.so" helps?
Comment 3 Mathias Homann 2012-09-01 07:22:04 UTC
nope, removing the qt tga plugin did not help.
Comment 4 Christoph Feck 2012-09-01 12:55:12 UTC
Could you provide a link to a TGA file which does not open with KDE's plugin?
Comment 5 Mathias Homann 2012-09-01 13:57:02 UTC
I attached two targa files that I just created in gimp. One is 512x512 with alpha channel, the other is 512x512 without alpha channel. both do not open in gwenview.
Comment 6 Mathias Homann 2012-09-01 13:57:54 UTC
Created attachment 73588 [details]
targa file without alpha channel
Comment 7 Mathias Homann 2012-09-01 13:58:39 UTC
Created attachment 73589 [details]
targa file with alpha channel
Comment 8 Christoph Feck 2012-09-01 15:19:43 UTC
Both of them open fine in Kolourpaint and using a simple QImage test program, so the KDE image plugin works correctly.

If unsure, use "strace" to check which plugin gets loaded.
Comment 9 Mathias Homann 2012-09-01 16:03:07 UTC
hmm on my system, kolourpaint refuses to open those files, "unsupported format".
Comment 10 Mathias Homann 2012-09-01 16:06:47 UTC
Created attachment 73590 [details]
strace output from trying to open a TGA in kolourpaint

Here's a strace of me trying to open a tga in kolourpaint.
Comment 11 Christoph Feck 2012-09-01 23:58:32 UTC
> open("/usr/lib64/qt4/plugins/imageformats/libqtga.so", O_RDONLY) = 9

Remove that file. Then try again.
Comment 12 Mathias Homann 2012-09-02 07:58:06 UTC
that did it. thanks! I'll file a bug against openSUSE qt now and close this here as wontfix :)