Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] KDE Plasma: Can’t save JPEG in KDE applications
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
stickstoff
n00b
n00b


Joined: 19 Jun 2004
Posts: 21

PostPosted: Sat Apr 03, 2021 1:18 pm    Post subject: [solved] KDE Plasma: Can’t save JPEG in KDE applications Reply with quote

Hi everyone,

Whenever I try to save a screenshot in Spectacle as JPEG. I get the following message:
Code:
QImageWriter cannot write image: Unsupported image format

followed by
Code:
Cannot save screenshot. Error while writing file.


Saving a KolourPaint image as JPEG yields the following error message:
Code:
Could not save as "test.jpg": Error saving image


I have also checked for JPEG support in Qt with some PyQt5 code:
Code:
>>> from PyQt5 import QtCore, QtGui, QtWidgets
>>> import sys
>>> app = QtWidgets.QApplication(sys.argv)
>>> 'jpg' in QtGui.QImageWriter.supportedImageFormats()
True
>>> 'jpeg' in QtGui.QImageWriter.supportedImageFormats()
True


The issue that has persisted over several versions of KDE Plasma and Qt now. I’m currently using Qt 5.15.2, KDE Plasma 5.21.3, and KDE Apps 20.12.3.

The "jpeg" USE flag is set for dev-qt/qtgui:
Code:
# emerge -pv dev-qt/qtgui

[ebuild   R    ] dev-qt/qtgui-5.15.2-r1:5/5.15.2::gentoo  USE="X dbus egl gif jpeg libinput png udev vulkan wayland -accessibility -debug -eglfs -evdev -gles2-only -ibus -test -tslib -tuio -vnc" 0 KiB


Any ideas on what else I could check?


Last edited by stickstoff on Sat Oct 08, 2022 12:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sat Apr 03, 2021 2:41 pm    Post subject: Reply with quote

What return command qlist -Iv 'jpeg*'?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
stickstoff
n00b
n00b


Joined: 19 Jun 2004
Posts: 21

PostPosted: Sat Apr 03, 2021 2:52 pm    Post subject: Reply with quote

fedeliallalinea wrote:
What return command qlist -Iv 'jpeg*'?


Here’s the output of qlist -Iv 'jpeg*':

Code:
media-libs/libjpeg-turbo-2.0.6
media-libs/openjpeg-2.4.0
virtual/jpeg-100
virtual/jpeg-compat-62
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sat Apr 03, 2021 3:14 pm    Post subject: Reply with quote

I thought you might have the old library media-libs/jpeg, but isn't the case.
You see some problem with ldd /usr/lib64/qt5/plugins/imageformats/libqjpeg.so command?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
stickstoff
n00b
n00b


Joined: 19 Jun 2004
Posts: 21

PostPosted: Sat Apr 03, 2021 3:19 pm    Post subject: Reply with quote

fedeliallalinea wrote:
I thought you might have the old library media-libs/jpeg, but isn't the case.
You see some problem with ldd /usr/lib64/qt5/plugins/imageformats/libqjpeg.so command?

Thanks fedeliallalinea! I can’t spot any problem:
Code:
linux-vdso.so.1 (0x00007ffd3bf29000)
libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5 (0x00007fcb2ae4d000)
libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007fcb2a8de000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007fcb2a859000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libstdc++.so.6 (0x00007fcb2a67b000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcb2a4ba000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcb2a49a000)
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fcb2a412000)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fcb2a3d8000)
libz.so.1 => /lib64/libz.so.1 (0x00007fcb2a3be000)
libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007fcb2a2d5000)
libm.so.6 => /lib64/libm.so.6 (0x00007fcb2a19d000)
libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fcb2a0c9000)
libdouble-conversion.so.3 => /usr/lib64/libdouble-conversion.so.3 (0x00007fcb2a0b8000)
libicui18n.so.68 => /usr/lib64/libicui18n.so.68 (0x00007fcb29da3000)
libicuuc.so.68 => /usr/lib64/libicuuc.so.68 (0x00007fcb29bb5000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fcb29baf000)
libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007fcb29b2a000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fcb299f8000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/libgcc_s.so.1 (0x00007fcb299dc000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcb2b4bb000)
libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007fcb29924000)
libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007fcb298f0000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fcb2982a000)
libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007fcb29803000)
librt.so.1 => /lib64/librt.so.1 (0x00007fcb297f7000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fcb297ce000)
libzstd.so.1 => /usr/lib64/libzstd.so.1 (0x00007fcb296f0000)
liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007fcb296cd000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007fcb296c2000)
libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007fcb2959d000)
libicudata.so.68 => /usr/lib64/libicudata.so.68 (0x00007fcb27a58000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fcb279e4000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fcb278a1000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fcb2788d000)
libbrotlidec.so.1 => /usr/lib64/libbrotlidec.so.1 (0x00007fcb2787f000)
libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007fcb27855000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fcb27829000)
libbrotlicommon.so.1 => /usr/lib64/libbrotlicommon.so.1 (0x00007fcb27806000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fcb27801000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fcb277f9000)
libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007fcb277e0000)
Back to top
View user's profile Send private message
stickstoff
n00b
n00b


Joined: 19 Jun 2004
Posts: 21

PostPosted: Sun Jun 19, 2022 11:32 am    Post subject: Re: KDE Plasma: Can’t save JPEG in KDE applications Reply with quote

Hi everyone,

I just wanted to bring this issue back, because it hasn’t gone, even after several update cycles.

Code:
# emerge -pv dev-qt/qtgui

[ebuild   R   ~] dev-qt/qtgui-5.15.4-r2:5/5.15.4::gentoo  USE="X dbus egl gif jpeg libinput png udev vulkan wayland -accessibility -debug -eglfs -evdev -gles2-only -ibus -linuxfb -test -tslib -tuio -vnc" 0 KiB


I’m currently using Qt 5.15.4, KDE Plasma 5.25.0, and KDE Apps 22.04.2.
Maybe someone can point me to the right direction to investigate what causes this issue.

Thanks!


stickstoff wrote:
Hi everyone,

Whenever I try to save a screenshot in Spectacle as JPEG. I get the following message:
Code:
QImageWriter cannot write image: Unsupported image format

followed by
Code:
Cannot save screenshot. Error while writing file.


Saving a KolourPaint image as JPEG yields the following error message:
Code:
Could not save as "test.jpg": Error saving image


I have also checked for JPEG support in Qt with some PyQt5 code:
Code:
>>> from PyQt5 import QtCore, QtGui, QtWidgets
>>> import sys
>>> app = QtWidgets.QApplication(sys.argv)
>>> 'jpg' in QtGui.QImageWriter.supportedImageFormats()
True
>>> 'jpeg' in QtGui.QImageWriter.supportedImageFormats()
True


The issue that has persisted over several versions of KDE Plasma and Qt now. I’m currently using Qt 5.15.2, KDE Plasma 5.21.3, and KDE Apps 20.12.3.

The "jpeg" USE flag is set for dev-qt/qtgui:
Code:
# emerge -pv dev-qt/qtgui

[ebuild   R    ] dev-qt/qtgui-5.15.2-r1:5/5.15.2::gentoo  USE="X dbus egl gif jpeg libinput png udev vulkan wayland -accessibility -debug -eglfs -evdev -gles2-only -ibus -test -tslib -tuio -vnc" 0 KiB


Any ideas on what else I could check?
Back to top
View user's profile Send private message
8an
n00b
n00b


Joined: 14 May 2005
Posts: 24

PostPosted: Sat Oct 08, 2022 10:27 am    Post subject: Reply with quote

If someone is still interested, I found the solution here:
https://bugs.kde.org/show_bug.cgi?id=439519#c17
I had to additionally remove *.jfif from the list.
Back to top
View user's profile Send private message
stickstoff
n00b
n00b


Joined: 19 Jun 2004
Posts: 21

PostPosted: Sat Oct 08, 2022 10:44 am    Post subject: Reply with quote

8an wrote:
If someone is still interested, I found the solution here:
https://bugs.kde.org/show_bug.cgi?id=439519#c17
I had to additionally remove *.jfif from the list.


Yes, thanks 8an! I can confirm this solved the issue for me.
I removed *.jfif first and after removing *.jpe, I can now save JPEG images again from KDE applications like Spectacle or KolourPaint.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum