SUMMARY I have a .psd file with many layers that when I open it in Krita version 4.4.5 it opens fine with all of the layers and the images are all correct. When I try and open the same file in Krita version 5.1.1 or Krita version 5.1.3, all of the layers are there but the image file is distorted with horizontal colored lines (see attachment) STEPS TO REPRODUCE 1. contact me if you want the .psd file that is causing the issue 2. Install Krita version 4.4.5 and open file, file is good, close without saving 3. Install Krita version 5.1.3 and open file, file images are distorted OBSERVED RESULT When I open the file in Krita version 4.4.5 the files opens fine and all of the images on each layer are fine. When I open the same file in Krita version 5.1.1 or 5.1.3 the file opens fine with all of the layers, however the images for some of the layers have distorted horizontal colored lines EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: Home 11 macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Created attachment 154157 [details] Krita version 5.1.1 distorted .psd file
Could you please attach the original psd file instead of a screenshot?
Here is the .psd file that causes the distorted image when imported using Krita 5.1.1 or Krita 5.1.3 This file opens fine in Krita 4.something If the .psd file is too large it can be accessed here "https://drive.google.com/file/d/170JPio5Qg1XySaMIR6nJpXi3ow0aJ_b2/view?usp=sharing"
Taking it, let's see what I can find.
(In reply to amyspark from comment #4) > Taking it, let's see what I can find. Very good, thank you
The file you supplied does not comply with the PackBits compression scheme. In v5, I ensured that whenever the decompression routine throws an error code, it is acted upon by zeroing the relevant row, which is causing this bug. The workaround is easy, but I'd like to confirm first why this is the case.
Git commit 5b48a3994c0161685cebad10db10c93669e16ca6 by L. E. Segovia. Committed on 23/12/2022 at 13:47. Pushed by lsegovia into branch 'master'. PSD: reimplement the PackBits decompressor This commit reimplements the decompression routine in C++11 to enable proper bounds checking, logging, and skipping the unnecessary copies. M +44 -93 libs/psdutils/compression.cpp https://invent.kde.org/graphics/krita/commit/5b48a3994c0161685cebad10db10c93669e16ca6
Git commit 0f826dd72121d873450f9e2b72e6df82c04169ea by L. E. Segovia. Committed on 23/12/2022 at 13:54. Pushed by lsegovia into branch 'krita/5.1'. PSD: reimplement the PackBits decompressor This commit reimplements the decompression routine in C++11 to enable proper bounds checking, logging, and skipping the unnecessary copies. M +44 -93 libs/psdutils/compression.cpp https://invent.kde.org/graphics/krita/commit/0f826dd72121d873450f9e2b72e6df82c04169ea
(In reply to amyspark from comment #8) > Git commit 0f826dd72121d873450f9e2b72e6df82c04169ea by L. E. Segovia. > Committed on 23/12/2022 at 13:54. > Pushed by lsegovia into branch 'krita/5.1'. > > PSD: reimplement the PackBits decompressor > > This commit reimplements the decompression routine in C++11 to enable > proper bounds checking, logging, and skipping the unnecessary copies. > > M +44 -93 libs/psdutils/compression.cpp > > https://invent.kde.org/graphics/krita/commit/ > 0f826dd72121d873450f9e2b72e6df82c04169ea Not sure what all of the above comment means, but it sounds like the problem was determined, a fix created and krita version 5.1 will not have this error. Thank you