Bug 409221 - Scale Image to new size does not take into account transform masks
Summary: Scale Image to new size does not take into account transform masks
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resize/Scale Image/Layer (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-26 18:44 UTC by dieter.de.moitie
Modified: 2021-05-25 07:19 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dieter.de.moitie 2019-06-26 18:44:17 UTC
SUMMARY
When scaling an image to a new size, all layers are scaled, but relative positions change if layers have a transform mask.


STEPS TO REPRODUCE
1. Create a new image of 1000x1000 pixels 
2. Draw a cirkel in the top left corner
3. Add a transform mask to this layer
4. Use the transform or the move tool to move this circle to the center of the image
5. Go to Image > Scale Image to New Size and resize the image to 500x500 pixels

OBSERVED RESULT
The circle is now at the bottom right corner

EXPECTED RESULT
The circle to be at the center of the image

SOFTWARE/OS VERSIONS
I am using krita-4.2.1-7c743d9-x86_64.appimage on a Fedora 30 system.
Comment 1 Dmitry Kazakov 2021-05-24 11:38:21 UTC
I'm going to hijack this bug :)
Comment 2 Dmitry Kazakov 2021-05-25 07:19:59 UTC
Git commit e1d14502d44f79fb28098734ad750a964a60c30e by Dmitry Kazakov.
Committed on 25/05/2021 at 07:19.
Pushed by dkazakov into branch 'master'.

Fix transform masks not to become distorted after scaling of the image

Now all transformations applied to the image will also be applied to
transform masks as well.

M  +11   -0    libs/image/kis_transform_mask_params_interface.cpp
M  +2    -0    libs/image/kis_transform_mask_params_interface.h
M  +37   -1    libs/image/processing/kis_transform_processing_visitor.cpp
M  +5    -0    plugins/tools/tool_transform2/kis_transform_mask_adapter.cpp
M  +1    -0    plugins/tools/tool_transform2/kis_transform_mask_adapter.h
M  +1    -1    plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp
M  +27   -31   plugins/tools/tool_transform2/tool_transform_args.cc
M  +2    -1    plugins/tools/tool_transform2/tool_transform_args.h

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