Bug 261088

Summary: PSD 16 Bit images not displayed
Product: [Applications] digikam Reporter: SCP <stephenpusey>
Component: Plugin-DImg-QImageAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, cfeck, mircomir
Priority: NOR    
Version: 7.3.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 7.8.0
Sentry Crash Report:

Description SCP 2010-12-23 18:14:19 UTC
Version:           1.6.0 (using KDE 4.5.4) 
OS:                Linux

Wishlist:  DigiKam currently only supports display of 8 bit PSD images.  16 bit PSD images are not viewable.  This is highly desirable - as many photographers use Photoshop (yes, with Wine) and process and archive their images as 16 bit.  Otherwise, digiKam is a beautiful program - my compliments to the developers.

Reproducible: Always

Steps to Reproduce:
Attempt to view a folder of 16 bit PSD images.

Actual Results:  
Generic icons are displayed in place of thumbnails of the actual images.

Expected Results:  
Thumbnails of the 16 bit PSD images should be viewable
Comment 1 caulier.gilles 2010-12-23 18:56:06 UTC
Can you provide some PSD image files to test

Gilles Caulier
Comment 2 Christoph Feck 2010-12-23 19:39:55 UTC
Or better, a documentation of newer PSD format?
Comment 3 caulier.gilles 2010-12-23 23:07:41 UTC
Hum, PSD is a proprietary format from Adobe. Ther is no doc avaialble, only reverse engineering work, as ImageMAgick PSD loader for ex :

http://trac.imagemagick.org/browser/ImageMagick/branches/ImageMagick-6.6.6/coders/psd.c

There is also FreeImage loader :

http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PSDParser.cpp?revision=1.13&view=markup

A beta libpsd exist too, as beta :

http://sourceforge.net/projects/libpsd/

The KDE/QImage image loader (8 bits) can be also adapted to digiKam:

http://websvn.kde.org/trunk/KDE/kdelibs/kimgio/psd.cpp?revision=755636&view=markup

Gilles Caulier
Comment 4 caulier.gilles 2011-12-13 09:56:11 UTC
digiKam do not have code to handle PSD image. It's delegate to KDE image IO component.

Gilles Caulier
Comment 5 Mirco Miranda 2022-07-04 13:57:55 UTC
(In reply to caulier.gilles from comment #4)
> digiKam do not have code to handle PSD image. It's delegate to KDE image IO
> component.

Hi Gilles,

also this one should be should be solved by MR !56 (https://invent.kde.org/frameworks/kimageformats/-/merge_requests/56)

Mirco.
Comment 6 caulier.gilles 2022-07-06 06:04:58 UTC
Hi Mirco,

The problem to support 16 bits PSD images is partially fixed with KF5 5.95. Look my screenshot of digiKam 7.8.0 under macOS compiled with KF5 5.95:

https://i.imgur.com/hh9zX0H.png

I generated a 16 bits PSD using integer encoding with GIMP. Thumbnail is ok.
I generated a 16 bits PSD using float encoding with GIMP. Thumbnail is broken.

Best regards

Gilles Caulier
Comment 7 Mirco Miranda 2022-07-06 06:20:46 UTC
Hi Gilles,

(In reply to caulier.gilles from comment #6)
> I generated a 16 bits PSD using integer encoding with GIMP. Thumbnail is ok.
> I generated a 16 bits PSD using float encoding with GIMP. Thumbnail is

Interesting... because Photoshop does not allow to save a 16-bit float PSD. Anyway, it opens the one saved by GIMP.
I'll fix the kimage-formats plugin ASAP. 

Mirco.
Comment 8 Mirco Miranda 2022-07-06 07:05:38 UTC
Hi Gilles,

> Interesting... because Photoshop does not allow to save a 16-bit float PSD.
> Anyway, it opens the one saved by GIMP.

I did some test under Windows.  I saved a grayscale 16-bit float using GIMP and the current version of kimage-formats plugin loads it without any issues. Another info is that the internal data are not float but are converted to 16-bits integer during the save operation by GIMP: this makes sense because PSD format does not have an option to discriminate if the data are float or integer (8/16-bits data are always integer, 32-bits data are always float).

Can you attach a PSD sample which give you the problem?
Comment 9 caulier.gilles 2022-07-06 07:43:48 UTC
Hi Mirco,

I shared files to you on my GDrive account. You will receive an email with the link on your gmail.

Gilles
Comment 10 Mirco Miranda 2022-07-06 09:54:12 UTC
Hi Gilles,

> I shared files to you on my GDrive account. You will receive an email with
> the link on your gmail.

I tested your images on Windows with latest version of PSD plugin and on my Debian unstable that uses KF 5.94. I also shared the project I used on the same folder on GDrive (there is also a screenshot).

I think the issues you have is not related to PSD plugin.

PS: I also added a screenshot of DigiKam 7.7.0 installed on my debian.
Comment 11 Mirco Miranda 2022-07-06 10:56:04 UTC
> PS: I also added a screenshot of DigiKam 7.7.0 installed on my debian.

I also installed latest Digikam on my Mac Studio M1 Max. You can find the screenshot in the same GDrive folder. Here works.
Comment 12 caulier.gilles 2022-07-06 10:59:27 UTC
Hi Mirco,

You are right. I restarted digiKam 7.8.0 on my macOS and now all thumbnails are properly displayed.

So the problem is really fixed. Thanks...

Gilles