Bug 444291

Summary: An image of 1.00 ppi resolution is opened at a forced 100ppi resolution
Product: [Applications] krita Reporter: Ahab Greybeard <ahab.greybeard>
Component: Tools/VectorAssignee: Krita Bugs <krita-bugs-null>
Severity: normal CC: halla
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ahab Greybeard 2021-10-23 19:34:23 UTC
This has been tested with appimages and it happens for versions 4.1.7 onwards to the latest Oct 23 5.1.0-prealpha (git 8e7ccd3).
Fractional ppi values are possible in versions 5.x.

If an image is created with a resolution of 1.00 ppi and then Saved and Closed, if the .kra file is then Opened it has its resolution forced to 100 ppi. This does not happen for an initial resolution of 1.01 ppi or greater.

This has consequences for any vector objects that are made when the resolution is initially 1.0 ppi.
They are enlarged by a factor of 100 and so is their offset from the top-left corner, so they are generally not visible and krita insists that the vector layer is empty if you try to manipulate it.

The vector objects can be examined in the .svg content of the .kra file and are Exported from krita as .svg.
You can see them if you open the .svg file with Inkscape, very large and very offset from the viewbox.

A resolution of 1.00 ppi may seem to be 'impractical' but it can be done and it has been done, causing problems for a user here:
Comment 1 Bug Janitor Service 2022-06-28 13:03:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1493
Comment 2 Halla Rempt 2022-06-28 15:43:19 UTC
Git commit 930da6975e9aacef7e78513d35c314481cf6026e by Halla Rempt.
Committed on 28/06/2022 at 13:02.
Pushed by rempt into branch 'master'.

Make it possible to load kra files with a 1ppi resolution

M  +2    -2    plugins/impex/libkra/kis_kra_loader.cpp

Comment 3 Halla Rempt 2022-06-28 15:47:29 UTC
Git commit a6bcb78580a7c0fea52a320014d56bd7acf70b94 by Halla Rempt.
Committed on 28/06/2022 at 15:47.
Pushed by rempt into branch 'krita/5.1'.

Make it possible to load kra files with a 1ppi resolution
(cherry picked from commit 930da6975e9aacef7e78513d35c314481cf6026e)

M  +2    -2    plugins/impex/libkra/kis_kra_loader.cpp