Bug 458887 - the canvas becomes larger when opening a PSD file
Summary: the canvas becomes larger when opening a PSD file
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (show other bugs)
Version: 5.1.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-08 17:48 UTC by thetwo
Modified: 2022-09-19 12:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
bug (2.84 MB, video/mp4)
2022-09-08 17:51 UTC, thetwo
Details
bug (730.24 KB, video/mp4)
2022-09-16 14:09 UTC, thetwo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thetwo 2022-09-08 17:48:53 UTC
SUMMARY
I found this phenomenon when others shared PSD files with me. I tested the PSD generated by Sai, PS and even krita itself, and there were all problems.

Please refer to the attachment for details.
Comment 1 thetwo 2022-09-08 17:51:39 UTC
Created attachment 151930 [details]
bug
Comment 2 Halla Rempt 2022-09-12 09:30:52 UTC
I can confirm the issue. The layer properties dialog still says 512x512, but there is a transparent bit at the bottom.
Comment 3 Halla Rempt 2022-09-12 09:31:50 UTC
It looks like loading, not saving is the problem.
Comment 4 Dmitry Kazakov 2022-09-16 12:54:01 UTC
Git commit 17c75646a3f570a07368603ec9867a18e543fced by Dmitry Kazakov.
Committed on 16/09/2022 at 12:53.
Pushed by dkazakov into branch 'master'.

Fix extra line visible on thums when loading a 512x512 PSD file

The hline iterators automatically cache the full pixel line on
nextRow() call, which would add to the extent() of the device.

M  +6    -1    libs/psd/psd_pixel_utils.cpp

https://invent.kde.org/graphics/krita/commit/17c75646a3f570a07368603ec9867a18e543fced
Comment 5 Dmitry Kazakov 2022-09-16 12:54:55 UTC
Git commit 2b786cee57b7db9fdd26d65af853436dbf460082 by Dmitry Kazakov.
Committed on 16/09/2022 at 12:54.
Pushed by dkazakov into branch 'krita/5.1'.

Fix extra line visible on thums when loading a 512x512 PSD file

The hline iterators automatically cache the full pixel line on
nextRow() call, which would add to the extent() of the device.


(cherry picked from commit 17c75646a3f570a07368603ec9867a18e543fced)

M  +6    -1    libs/psd/psd_pixel_utils.cpp

https://invent.kde.org/graphics/krita/commit/2b786cee57b7db9fdd26d65af853436dbf460082
Comment 6 thetwo 2022-09-16 14:09:02 UTC
Created attachment 152103 [details]
bug

Hi, I see that the commit says " a 512x512 PSD file", but it's not the only one, at least the 256x256 PSD that someone else shared with me has the same problem.
I can't do more testing right now because in 5.1.1 I'm having more serious problem, even without saving as psd it's larger and I can't trim ......
Not sure if they are the same problem, I'll leave it here for now.
Comment 7 thetwo 2022-09-17 12:55:59 UTC
I tested today's nightly. It was normal when 512x512 and 256x256 were opened. However, problems may still occur when opening files of other sizes. I uploaded some files, of which 1 and 2 are abnormal:https://ufile.io/r87ehbld

As for the video uploaded last time, I think it is a bug about thumbnails, and I will make another report soon.
Comment 8 Halla Rempt 2022-09-17 13:02:49 UTC
Dmitry, please take a look?
Comment 9 Dmitry Kazakov 2022-09-19 12:16:54 UTC
Hi, @thetwo!

The bug in a comment is a different bug you reported as bug 459273, which is, in turn, the same bug as bug 459273. We should think whether we should fix this bug some time later.