View Issue Details

IDProjectCategoryView StatusLast Update
0033983FPCFCLpublic2020-11-14 12:57
ReporterLior Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Platform64 bitOSWindows 10 
Product Version3.0.4 
Summary0033983: Bad Photoshop files decoding / "FPReadPSD" unit from FCL
DescriptionSome PSD files don't get decoded properly.
Attached a zipped PSD file with viewing issues, this happens because the file has an extra channel, notice how the background in the image is hidden where it shouldn't be.

Additional InformationLibpsd - works well.
https://github.com/TheNicker/libpsd

FreeImage produces the same error.
http://freeimage.sourceforge.net/


I opened the original bug for double commander
https://doublecmd.sourceforge.io/mantisbt/view.php?id=1471
but it seems like a FCL issue.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Lior

2018-07-14 02:05

reporter  

lena.7z (546,618 bytes)

Maxim Ganetsky

2018-07-17 01:18

reporter   ~0109527

Double Commander probably uses BGRABitmap for PSD rendering. Neither FPC nor Lazarus projects maintain it.

Alexander Koblov

2018-07-17 05:58

reporter   ~0109533

No, Double Commander uses "FPReadPSD" unit from FCL. Sample program attached.

Alexander Koblov

2018-07-17 05:58

reporter  

ReadPSD.zip (753,345 bytes)

Marco van de Voort

2018-08-25 16:48

manager   ~0110303

Last edited: 2018-08-25 16:48

View 2 revisions

file says: lena.psd: Adobe Photoshop Image, 512 x 512, RGBA, 4x 8-bit channels

Marco van de Voort

2018-08-25 16:50

manager   ~0110304

Last edited: 2018-08-25 16:53

View 3 revisions

Looks fine for me with FPC +lazarus/trunk on win32, I see lena on a transparent (grey) background, same color as form.

Maybe i don't know what to look for? Looks same as open office to me.

Marco van de Voort

2018-08-25 16:53

manager  

lenasidebyside.png (846,869 bytes)

wp

2018-08-25 17:40

reporter  

readpsd_screenshot.jpg (102,737 bytes)   
readpsd_screenshot.jpg (102,737 bytes)   

wp

2018-08-25 17:48

reporter   ~0110305

No, there is a background - see screenshot "ReadPSD_screenshot.jpg" in which the outputs of IrfanView (left) and the provided demo project (right) are overlaid. The IrfanView display is obtained also with Zoner PhotoStudio, Corel PaintShopPro, PhotoFiltre, XnView. LibreOffice does not display the image at all, it reports "unknown image format".

Michael Van Canneyt

2020-11-14 12:57

administrator   ~0126919

I tested the image with the FPC provided image conversion program.
It converts the .PSD to a PNG. I opened both files with Gimp. Attached the result.
The conversion happens correctly, as you can see, 1o the reading (and subsequent write) happens correctly.
If there is a display bug, it is in the LCL somewhere.

Michael Van Canneyt

2020-11-14 12:57

administrator   ~0126920

converted.png (483,585 bytes)

Issue History

Date Modified Username Field Change
2018-07-14 02:05 Lior New Issue
2018-07-14 02:05 Lior File Added: lena.7z
2018-07-17 01:18 Maxim Ganetsky LazTarget => -
2018-07-17 01:18 Maxim Ganetsky Note Added: 0109527
2018-07-17 01:18 Maxim Ganetsky Status new => resolved
2018-07-17 01:18 Maxim Ganetsky Resolution open => no change required
2018-07-17 01:18 Maxim Ganetsky Assigned To => Maxim Ganetsky
2018-07-17 05:58 Alexander Koblov Note Added: 0109533
2018-07-17 05:58 Alexander Koblov File Added: ReadPSD.zip
2018-07-17 09:24 wp Status resolved => assigned
2018-07-17 09:24 wp Resolution no change required => reopened
2018-07-17 09:24 wp Status assigned => feedback
2018-07-17 14:00 Maxim Ganetsky Assigned To Maxim Ganetsky =>
2018-07-17 14:00 Maxim Ganetsky Status feedback => confirmed
2018-07-17 19:39 wp Assigned To => wp
2018-07-17 19:39 wp Status confirmed => feedback
2018-07-17 23:52 Maxim Ganetsky Project Lazarus => FPC
2018-07-18 00:22 Martin Friebe Assigned To wp =>
2018-07-18 00:22 Martin Friebe Status feedback => new
2018-07-18 00:22 Martin Friebe Product Version 1.8.4 =>
2018-07-18 00:24 Martin Friebe Product Version => 3.0.4
2018-07-18 00:24 Martin Friebe Build 1.8.4 official release => 3.0.4
2018-07-18 00:25 Martin Friebe Summary Bad Photoshop files decoding => Bad Photoshop files decoding / "FPReadPSD" unit from FCL
2018-08-25 16:48 Marco van de Voort Note Added: 0110303
2018-08-25 16:48 Marco van de Voort Note Edited: 0110303 View Revisions
2018-08-25 16:50 Marco van de Voort Note Added: 0110304
2018-08-25 16:50 Marco van de Voort Note Edited: 0110304 View Revisions
2018-08-25 16:53 Marco van de Voort Note Edited: 0110304 View Revisions
2018-08-25 16:53 Marco van de Voort File Added: lenasidebyside.png
2018-08-25 17:40 wp File Added: readpsd_screenshot.jpg
2018-08-25 17:48 wp Note Added: 0110305
2020-11-14 12:57 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-11-14 12:57 Michael Van Canneyt Status new => resolved
2020-11-14 12:57 Michael Van Canneyt Resolution reopened => no change required
2020-11-14 12:57 Michael Van Canneyt FPCTarget => -
2020-11-14 12:57 Michael Van Canneyt Note Added: 0126919
2020-11-14 12:57 Michael Van Canneyt Note Added: 0126920
2020-11-14 12:57 Michael Van Canneyt File Added: converted.png