Bug 354413 - psd thumbnails are not loading in dolphin
Summary: psd thumbnails are not loading in dolphin
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kimageformats
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Merry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-26 18:17 UTC by Raghavendra kamath
Modified: 2016-08-03 14:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.0


Attachments
test psd for thumbnailers created in krita (683.56 KB, image/x-photoshop)
2016-06-18 15:16 UTC, Raghavendra kamath
Details
screenshot with dolphin displaying a preview on my system (115.22 KB, image/png)
2016-06-18 16:21 UTC, Wolfgang Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2015-10-26 18:17:13 UTC
The thumbnails of psd files are not loading ( or getting generated ) in preview mode in dolphin.
To verify if it is not the file limit i have checked 1 mb psd too but the thumbnail is not getting generated.

while answering my question on reddit Kai Uwe Broulik tried to solve it by making a patch but it didn't work out. you can see the patch in review here -> https://git.reviewboard.kde.org/r/125790/

Reproducible: Always
Comment 1 Wolfgang Bauer 2016-01-09 10:01:07 UTC
This not only affects the thumbnailer, but loading psd files in KF5 applications in general.

I found a bug in the psd loader, introduced by the refactoring in commit https://quickgit.kde.org/?p=kimageformats.git&a=commit&h=47e8043d4583230afb013b12b35b848b732c3565 .

A proposed fix is here:
https://git.reviewboard.kde.org/r/126684
Comment 2 Wolfgang Bauer 2016-01-10 12:28:19 UTC
Git commit 5d7ef7c38e9f6aa473fec5ee7f1daabcb405ffd7 by Wolfgang Bauer.
Committed on 10/01/2016 at 12:24.
Pushed by wbauer into branch 'master'.

fix loading of RLE compressed PSD files

decodeRLEData() expects a quint16 as length, but the PSD loader calls it
 with a quint32.
We do need quint32 for PSD, otherwise it would overflow for images
bigger than 256x256 pixels (it's the pixel count there, i.e. width x
 height).
FIXED-IN: 5.19.0
REVIEW: 126684

M  +1    -1    src/imageformats/rle_p.h

http://commits.kde.org/kimageformats/5d7ef7c38e9f6aa473fec5ee7f1daabcb405ffd7
Comment 3 Raghavendra kamath 2016-01-10 13:35:25 UTC
thank you everybody for this , thanks Wolfgang Bauer
Comment 4 Raghavendra kamath 2016-06-17 10:24:46 UTC
unfortunately the thumbnails are broken again on dolphin 16.04.2  so I am reopening the issue
Comment 5 Wolfgang Bauer 2016-06-18 14:57:44 UTC
(In reply to Raghavendra kamath from comment #4)
> unfortunately the thumbnails are broken again on dolphin 16.04.2  so I am
> reopening the issue

Hm. Works fine here.

Also the picture thumbnailer and the PSD image plugin are part of KDE Frameworks, so the dolphin version is irrelevant here and a dolphin update will not change anything.

How exactly is it "broken"?
Is "Previews" enabled in general, and is the image thumbnailer in particular activated in Dolphin's settings->General->Previews?

Are all thumbnails "broken", or just PSD?
If the latter, can you attach an affected PSD file please? Maybe it's in a format that's not supported...

And also try to wipe out the thumbnails cache (~/.cache/thumbnails/) and/or try a fresh user account, maybe the already generated previews got corrupted somehow.
Comment 6 Raghavendra kamath 2016-06-18 15:15:44 UTC
Hi  Wolfgang Bauer,

Sorry I forgot that thumbnailers are different than dolphin.
 >Is "Previews" enabled in general, and is the image thumbnailer in particular activated in Dolphin's settings->General->Previews?

yes previews are enabled in general, the image thumbnailer is activated

>Are all thumbnails "broken", or just PSD?

No all thumbnails are not broken , the png jpg etc have thumbnails , it is just psd.
the psd files which had thumbnails earlier now only have the icon.
I will attach a test file , which is created with krita ( please note all files are affected even psd created with photoshop and gimp too not just krita, I dont have photoshop now so can't create a fresh test psd from it hence attaching a psd created by krita)

>And also try to wipe out the thumbnails cache (~/.cache/thumbnails/) and/or try a fresh user account, maybe the already generated previews got corrupted somehow.

I wiped the thumbnails folder , and also checked under new user, it didn't help.
Comment 7 Raghavendra kamath 2016-06-18 15:16:28 UTC
Created attachment 99571 [details]
test psd for thumbnailers created in krita
Comment 8 Wolfgang Bauer 2016-06-18 16:21:55 UTC
Created attachment 99579 [details]
screenshot with dolphin displaying a preview on my system

Well, the attached picture does display a preview here...

Do you actually have kimageformats installed?
At least that's how the package is called in openSUSE, and that one contains the additional image plugins for Qt (to add support for PSD and other formats like KRA, TGA, PCX).

There should be corresponding .desktop files in /usr/share/kservices5/qimageioplugins/ (that's the path in openSUSE), psd.desktop for PSD, and the actual plugins in /usr/lib64/qt5/plugins/imageformats/ (this might differ on your system), kimg_psd.so in this case.

If those plugins are missing, the general image thumbnailer would not be able to open those image formats.
Comment 9 Raghavendra kamath 2016-08-03 14:43:04 UTC
Yes missing kimageformats was the problem,

sorry for the false alarm.

closing this report . thank you