| Summary: | scaleImage modifies hidden guides and ignores passed xRes and yRes | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Daniel <dstout55> |
| Component: | Resize/Scale Image/Layer | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | halla |
| Priority: | NOR | ||
| Version First Reported In: | 5.1.4 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Daniel
2023-01-02 03:37:33 UTC
Here's the script I'm referring to, run in Scripter: doc = Krita.instance().documents()[0] horGuides = doc.horizontalGuides() verGuides = doc.verticalGuides() print(horGuides, verGuides) clone = doc.clone() print(clone.horizontalGuides(), clone.verticalGuides()) print(clone.width(), clone.height(), clone.xRes(), clone.yRes()) clone.scaleImage(1087, 1828, 300, 300, "Hermite") print(clone.width(), clone.height(), clone.xRes(), clone.yRes()) print(clone.horizontalGuides(), clone.verticalGuides()) Here's a pastebin for the output I'm referring to.. Apparently this bug tracker really doesn't like numbers or square brackets or something.. https://pastebin.com/NyWkEUSt Here's something strange: If I set the guides as visible on the source document before cloning and then hide them immediately after cloning, then the guides do not get modified when the clone is scaled. If I try calling setGuidesVisible(True) on the clone, however, even before calling scaleImage on the clone, the guides get modified. It seems like something about the Document::clone() method treats guides differently depending on whether or not they're visible, and that difference affects a future scaleImage call? I'm not sure what's up, but I can confirm the results. It is not a regression: Krita 4.4.8 had the same issue. |