Bug 444291 - An image of 1.00 ppi resolution is opened at a forced 100ppi resolution
Summary: An image of 1.00 ppi resolution is opened at a forced 100ppi resolution
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Tools/Vector (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-23 19:34 UTC by Ahab Greybeard
Modified: 2022-06-28 15:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahab Greybeard 2021-10-23 19:34:23 UTC
SUMMARY
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:
https://krita-artists.org/t/vector-layers-blank-after-reopening-save/30737
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

https://invent.kde.org/graphics/krita/commit/930da6975e9aacef7e78513d35c314481cf6026e
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

https://invent.kde.org/graphics/krita/commit/a6bcb78580a7c0fea52a320014d56bd7acf70b94