Bug 418866

Summary: GWenview fails to open *.xpm files
Product: [Applications] gwenview Reporter: juan carlos <juancarlospaco>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: NOR    
Version First Reported In: 19.12.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description juan carlos 2020-03-15 11:20:03 UTC
SUMMARY
GWenview fails to open XPM1 and XPM2 *.xpm files.

STEPS TO REPRODUCE
1. Open XPM1 and XPM2 *.xpm files.
2. Gwenview fails to open valid file.

EXPECTED RESULT
View XPM1 and XPM2 images.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux x86_64 ArcoLinux B
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Sample Files:

- https://en.wikipedia.org/wiki/X_PixMap#XPM2
- https://en.wikipedia.org/wiki/X_PixMap#XPM

You can open both with Gimp.

Plain-text human-readable ASCII uncompressed image format should be easy to parse.
Comment 1 Christoph Feck 2020-04-09 19:21:13 UTC
The XPM image loader is part of the Qt libraries, it only supports the version XPM3 that is the default version since 1991.

https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/image/qxpmhandler.cpp
https://en.wikipedia.org/wiki/X_PixMap#XPM3

If you really need to support older versions, I suggest to report this issue directly to Qt developers via https://bugreports.qt.io/ with a test case.