Summary: | Document Object xRes, yRes and Resolution have different values. | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | wolthera <griffinvalley> |
Component: | Scripting | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/krita/60b81074027b7cbd68563b846dc5956b53828d6a | Version Fixed In: |
Description
wolthera
2018-02-12 18:38:02 UTC
So, uh, this is kinda serious bug, but I cannot fix it due to to not really undrstnading it. Thing is, Krita for some reason assumes xRes and yRes are 1.0, which means they are 72 dpi. LibKis multiplies xRes by 72 dpi to give document.resolution() document.scaleNode requests regular xRes and yRes though. LiKis also doesn't allow setting the DPI of created documents, which are always set to 100, which SHOULD be 1.0 if it needs to be 72 dpi. (Like in Krita Sketch ImageBuilder::createBlankImage(int width, int height, int resolution) ) Which means that newly created images are always at 7200 dpi. I uh, I am not sure how we should resolve all of this. Git commit 60b81074027b7cbd68563b846dc5956b53828d6a by Wolthera van Hövell tot Westerflier. Committed on 13/02/2018 at 13:08. Pushed by woltherav into branch 'master'. I am not sure why we have this crazy system at all... M +5 -5 libs/libkis/Document.cpp https://commits.kde.org/krita/60b81074027b7cbd68563b846dc5956b53828d6a |