Bug 332485 - gwenview doesn't open targa (.tga) files
Summary: gwenview doesn't open targa (.tga) files
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 4.11.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-23 22:28 UTC by farmboy0
Modified: 2017-11-27 21:25 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 17.12


Attachments
image example that failed to load (3.00 MB, image/x-tga)
2014-03-23 22:28 UTC, farmboy0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description farmboy0 2014-03-23 22:28:48 UTC
Created attachment 85704 [details]
image example that failed to load

The following message is shown in the console:
gwenview(4682) Gwenview::LoadingDocumentImplPrivate::loadMetaInfo: QImageReader::read() using format hint "tga" failed: "Unknown error" 
gwenview(4682) Gwenview::LoadingDocumentImplPrivate::loadMetaInfo: Image format is actually "tga" not "tga" 

In the picture frame it says:
Loading ‘dxn_wal2.tga’ failed
Loading image failed.
Comment 1 Christoph Feck 2014-03-24 01:40:59 UTC
That's not a Truevision (TGA) file, but a Windows Cursor file. Rename from *.tga to *.cur, and it loads correctly.
Comment 2 farmboy0 2014-03-25 20:00:24 UTC
I cannot change the file extension. This is a texture for Star Wars Knights of the Old Republic 2 and it needs to have a tga extension.
Besides file, irfan view and xnview disagree with you. All of them think this picture is indeed a truevision targa file.
Besides gwenview can obviously read the picture or it wouldnt be able to show a preview.
Comment 3 Jekyll Wu 2014-03-31 07:28:14 UTC
Can reproduce the problem using Gentoo but fine in Arch, so probably a Qt installation problem.
Comment 4 ARA 2014-07-29 17:40:30 UTC
I can reproduce the problem in OpenSuSE 13.1 (Gwenview 4.11.4, KDE 4.11.5, QT 4.8.5) with both my own files and the example file. Changing the extension of the files to .cur causes them to disappear from Gwenview completely. However, simply removing the file extension works to display the file.

With no file extension, Gwenview displays the image and outputs to the command line:
'''
gwenview(6588) Gwenview::ViewMainPage::url: Condition ' d->currentView() ' failed.
'''
But this error happens every time the image is scrolled in the main picture frame, and so may be unrelated.

For a guess, I would say that there are two ways to load a file - one based on the extension and the other based on the file type.  And the extension loader is failing.

-A
Comment 5 farmboy0 2015-10-24 17:58:59 UTC
This still happens with gwenview 4.14.0 pre.
Additionally the console shows the following message:
gwenview(11569) Gwenview::LoadingDocumentImplPrivate::loadMetaInfo: QImageReader::read() using format hint "tga" failed: "Unknown error" 
gwenview(11569) Gwenview::LoadingDocumentImplPrivate::loadMetaInfo: Image format is actually "tga" not "tga"
Comment 6 Nate Graham 2017-11-10 18:17:19 UTC
Gwenview is now able to open this image, but its .desktop file doesn't indicate that Gwenview can open Targa images. Let's fix that.
Comment 7 Nate Graham 2017-11-27 21:25:58 UTC
author	Nathaniel Graham <pointedstick@zoho.com>	2017-11-27 21:12:11 (GMT)
committer	Nathaniel Graham <pointedstick@zoho.com>	2017-11-27 21:12:25 (GMT)
commit	3d4dfd9f3a5bd805b4883417001d221017659788 (patch)
tree	7548d55a3de31738d1e971b8230f1c4bd163ca04
parent	9056aa941e0d624094ef2762e9bbb705e56f753e (diff)
Indicate that Gwenview can open Targa imagesApplications/17.12
Summary: BUG: 332485

Test Plan: After updating the .desktop files and running `sudo update-desktop-database`, Gwenview was correctly registered as a handler for .tga files, and they opened and displayed exactly as they should.

Reviewers: #kde_applications, rkflx, broulik

Reviewed By: rkflx

Differential Revision: https://phabricator.kde.org/D8751
Diffstat
-rw-r--r--	app/org.kde.gwenview.desktop	2	
		
-rw-r--r--	part/gvpart.desktop	2	
		
2 files changed, 2 insertions, 2 deletions