GNOME Bugzilla – Bug 555222
PSD Load Plugin: unsupported compression mode
Last modified: 2008-10-08 18:13:42 UTC
The loading of certain PSD files is not possible. It appears the following error message: Unsupported compression mode: 33279. Someone (using Photoshop) made some tests and told me is could be caused by empty layers. In 2.5.4 the issue didn't exist and might be introduced by fixing this bug 544939.
The fix for bug 544939 was included in 2.5.4, so if it works in 2.5.4 the error can not have been introduced by that fix. Are you sure it worked in 2.5.4? Could you attach the file please?
Created attachment 120090 [details] file not loadable Yes it works in 2.5.4. The error (the error message) was another one by bug 544939. The file still attached in that bug loads without problems.
If it works in 2.5.4 we should get it to work in the 2.6 series. Putting on the 2.6 milestone. I still really doubt it worked in 2.5.4 if it doesn't work in 2.6.0, because there were afaics no changes to the PSD plugin between 2.5.4 and 2.6.0. I'll try for myself later...
This file does fail to load in GIMP 2.5.4 with the same error message.
My conclusion is the same on a freshly built GIMP 2.5.4 on Linux. So the question now is, exactly in what version did this file load properly? (Heiko, look in Help -> About.)
It loads OK for me in 2.5.0 (built from source, linux).
Created attachment 120147 [details] PSD load plugin in Gimp 2.5.4 Ok I checked it again with Gimp 2.5.4 and the file loads well although the progress bar stops for a short moment. I checked Help - About and it says 'Gimp 2.5.4'. The stable version (in this case 2.6.0) is always installed under C:\Programme\Gimp-2.0. The development version 2.5.4 I have in C:\Programme\Gimp-2.5. Attached is the psd load plugin which is in C:\Programme\GIMP-2.5\lib\gimp\2.0\plug-ins and again this plugin opens the file without problems. I downloaded Gimp 2.5.4 here (http://sourceforge.net/project/showfiles.php?group_id=121075)
Maybe someone should just try to make the file load...
Created attachment 120171 [details] [review] Patch to skip empty channels/layers This gets the image in question to load. I'm not sure if the formatting is 100%, but hopefully it works. I have not done any extensive testing.
Thank you for taking the time to make a patch! As far as I know though, that patch will reintroduce bug 544939 :( Could you try that please? Oh and btw, no tabs in the source code please. And we are not C99 yet so you can't define a local variable mid-block.
Created attachment 120208 [details] [review] psd-proper-load-fix-2008-10-08.patch The patch did indeed introduce bug 544939 but the proper fix is very natural when one thinks about it. It would be very nice if one of you guys could apply this patch and load a variety of PSD files you have. The patch loads both the PSD in this bug report and the PSD in bug 544939 but testing on more PSD will definitly not hurt.
Created attachment 120212 [details] Another PSD that craches GIMP The last patch works for me - I loaded about 40 PSD files with no issues. However, this PSD attachment causes a segfault in both 2.5.0 and 2.6.0. It appears to be a separate issue (at least to me).
Doesn't the compiler warn about "comp_mode" might be used uninitialized?
It didn't, and probably can not be of any harm, but you have a fair point so I fixed that. Thank you very much Chris for testing the patch. I have now commited it to trunk, rev 27175: 2008-10-08 Martin Nordholts <martinn@svn.gnome.org> Bug 555222 – PSD Load Plugin: unsupported compression mode * plug-ins/file-psd/psd-load.c (add_layers): Some PSD files can have channels where a compression method used for the channel data is specified, but without any actual channel data. Handle this case. Fix inspired by patch from Chris Mohler. then trunk rev 27176: 2008-10-08 Martin Nordholts <martinn@svn.gnome.org> * plug-ins/file-psd/psd-load.c (add_layers): Decrease scope of comp_mode and initialize it. The new PSD file does indeed crash because of a different reason. Can you create a separate bug report and attach that files please? I will then add a stack trace for the crash for you.