GNOME Bugzilla – Bug 167139
PSD save plugin can create corrupt files
Last modified: 2008-01-15 12:47:43 UTC
Please describe the problem: The PSD save plugin can create corrupt files on certain images. This is triggered when the bottom most layer in an image has different dimentions than the image. Applications only seem to notice that the file is corrupt when the image has extra channels. Steps to reproduce: 1. Create an image where the bottom most layer has different dimentions than the image. 2. Add an extra channel to the image 3. Save as a psd 4. Try to open the file in photoshop or the gimp Actual results: The opening application fails to load the image claiming premature eof Expected results: The image should open Does this happen every time? yes Other information: I know exactly where the bug in the code is, but it will probably be several days before I get around to fixing it.
I just checked a fix for this bug (and #121871) into CVS. Should it be backported to the 2.2 stable version?
Jay, that's up to you. If you think the change is simple enough or if you think it fixes a major problem, please backport it.
While I tend to think file corruption is a pretty major bug, no one has reported any in the two years that we have been using this code. Unfortunatly the fix for this bug is part of a large rewrite I did to fix bug #121871 which replaces 485 lines of code with 209 lines of code. I would feel better about making such a large change to the stable version if we could get a couple of people to stress test the new version of the plugin first. Any volunteers?
I'm not volunteering, but this points out the need of some kind of testing framework. Would be nice to have a whole bunch of images in all kinds of formats and let GIMP Open/Save them, compare them with expected results, etc.
Ive done some more testing myself and everything checks out. Backported to the 2.2 stable branch. Closing bug as fixed.