Bug 303452 - Transform tool does not giving expected results
Summary: Transform tool does not giving expected results
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: unspecified
Platform: Microsoft Windows Other
: NOR major
Target Milestone: ---
Assignee: Dmitry Kazakov
URL: http://img513.imageshack.us/img513/70...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-07-13 06:44 UTC by slawek
Modified: 2013-01-14 03:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
shows the transfornation bug (138.43 KB, image/jpeg)
2012-07-29 13:04 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description slawek 2012-07-13 06:44:30 UTC
"Transform a layer or a selection" tool is returning corrupted results at various occasions. For what I see it is working ok as long as user is just scaling or skewing but when is trying to use that perspective transformation with "ctrl" pushed  results are getting pretty strange. I am sending you link with visuals that may explain things better. It happened twice to me that transformation was doing nothing - in that transparent preview everything was fine but after hitting enter to confirm it was simply returning no effect at all. I didnt menage to find a sure pattern to recreate that behavior but in picture you have other example.

Reproducible: Always

Steps to Reproduce:
described in attached visual.
Actual Results:  
Transformations are completely wrong and results are distorted.

Expected Results:  
Transformation of an object matching exactly semi-transparent preview.

All tested on Windows 7 64bit, latest windows build
Comment 1 Sven Langkamp 2012-07-14 13:58:27 UTC
There is no attachment.
Comment 2 Halla Rempt 2012-07-29 13:04:15 UTC
Created attachment 72812 [details]
shows the transfornation bug

I can easily reproduce. Looks like only part of the transformed image is painted correctly over the original.
Comment 3 Halla Rempt 2012-07-30 08:14:22 UTC
This is a regression from 2.4 -- probably the result of the iterator refactoring, but I'll have to git bisect to figure that out.
Comment 4 Halla Rempt 2012-08-08 18:57:51 UTC
This still works correct in 2.5, so I doubt it's the iterator refactoring
Comment 5 ALeXeY 2012-08-25 17:20:29 UTC
(In reply to comment #1)
> There is no attachment.

IMHO, the author's attachment is under the "URL" link.

By the way, the bug is still appears in current commit 49218e90...
Comment 6 David REVOY 2012-11-23 14:58:50 UTC
I also confirm it and still easy to replicate on master of today. It's make the 'Ctrl' perspective feature broken in general.

It can also compute anormally long on certain deformation, and grow here in Ram exponentially ; easily to 5GB of ram incrementally by 100MB by 100MB ( compute more than 5 minutes, freezing system ; but always succeed to finish , even if result is not what widget traced  ).
Comment 7 genosias 2012-12-20 01:58:47 UTC
I confirm that behavior and this is really annoying.
Comment 8 Dmitry Kazakov 2013-01-09 15:39:41 UTC
Git commit a27ca9fc5db2c286de2c9d24e15e7b3b9e5a3394 by Dmitry Kazakov.
Committed on 09/01/2013 at 16:27.
Pushed by dkazakov into branch 'master'.

Fixed Perspective Transform Worker to work properly

1) The class is cleaned up (use QTransform instead of explicit matrix computation)
2) The usage of split rects make the transformation very-very-very fast

M  +44   -72   krita/image/kis_perspectivetransform_worker.cpp
M  +8    -11   krita/image/kis_perspectivetransform_worker.h
A  +59   -0    krita/image/kis_progress_update_helper.h     [License: GPL (v2+)]
M  +3    -39   krita/image/kis_transform_worker.cc
M  +93   -0    krita/image/krita_utils.cpp
M  +6    -0    krita/image/krita_utils.h
M  +6    -0    krita/image/tests/CMakeLists.txt
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_blur1_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_blur1_paintDevice.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_blur1_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_clone1_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_clone1_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_paint1_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_paint1_paintDevice.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_paint1_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_root_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_root_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_tmask1_paintDevice.png
A  +-    --    krita/image/tests/data/perspective_worker_test/simple_transform/simple_transform_paint1_original.png
A  +73   -0    krita/image/tests/kis_perspective_transform_worker_test.cpp     [License: GPL (v2+)]
C  +10   -11   krita/image/tests/kis_perspective_transform_worker_test.h [from: krita/image/krita_utils.h - 067% similarity]
M  +3    -89   krita/plugins/paintops/experiment/kis_experiment_paintop.cpp
M  +4    -6    krita/plugins/tools/tool_transform2/kis_tool_transform.cc

http://commits.kde.org/calligra/a27ca9fc5db2c286de2c9d24e15e7b3b9e5a3394
Comment 9 Inge Wallin 2013-01-14 03:30:58 UTC
Git commit aaec82da4ef4bfb620fcad64e34c9948786537af by Inge Wallin, on behalf of Dmitry Kazakov.
Committed on 09/01/2013 at 16:27.
Pushed by ingwa into branch 'text-annotations-ingwa'.

Fixed Perspective Transform Worker to work properly

1) The class is cleaned up (use QTransform instead of explicit matrix computation)
2) The usage of split rects make the transformation very-very-very fast

M  +44   -72   krita/image/kis_perspectivetransform_worker.cpp
M  +8    -11   krita/image/kis_perspectivetransform_worker.h
A  +59   -0    krita/image/kis_progress_update_helper.h     [License: GPL (v2+)]
M  +3    -39   krita/image/kis_transform_worker.cc
M  +93   -0    krita/image/krita_utils.cpp
M  +6    -0    krita/image/krita_utils.h
M  +6    -0    krita/image/tests/CMakeLists.txt
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_blur1_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_blur1_paintDevice.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_blur1_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_clone1_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_clone1_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_paint1_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_paint1_paintDevice.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_paint1_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_root_original.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_root_projection.png
A  +-    --    krita/image/tests/data/perspective_worker_test/initial/initial_tmask1_paintDevice.png
A  +-    --    krita/image/tests/data/perspective_worker_test/simple_transform/simple_transform_paint1_original.png
A  +73   -0    krita/image/tests/kis_perspective_transform_worker_test.cpp     [License: GPL (v2+)]
C  +10   -11   krita/image/tests/kis_perspective_transform_worker_test.h [from: krita/image/krita_utils.h - 067% similarity]
M  +3    -89   krita/plugins/paintops/experiment/kis_experiment_paintop.cpp
M  +4    -6    krita/plugins/tools/tool_transform2/kis_tool_transform.cc

http://commits.kde.org/calligra/aaec82da4ef4bfb620fcad64e34c9948786537af