Bug 318885 - Allow crop to center.
Summary: Allow crop to center.
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
Depends on:
Reported: 2013-04-25 22:53 UTC by vanyossi
Modified: 2013-11-13 13:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description vanyossi 2013-04-25 22:53:39 UTC
Sometimes when cropping at fixed aspect ratio the crop area will need to overflow the canvas to conform with the ratio. In order to avoid growing the canvas before cropping or resizing the image after doing so. Could we have this in one step as Gimp does it?

Crop from centre. Having the mirror functions, it would be nice if we could crop the image visually from the image centre to keep working on the symmetrical piece. Canvas size adjustment allows this, but its not visual at all.

Reproducible: Always
Comment 1 Shivaraman Aiyer 2013-05-22 06:38:30 UTC
Hi Vanyossi,
I will be looking into this bug, but I have a few questions to ask. As I personally haven't used krita baring the basic few tools, I am not very clear about what you are talking about. Can you please give me a bit more detailed reproduction path and what you expect as the result to be.

Sorry for the inconvenience caused.
Comment 2 vanyossi 2013-05-22 15:55:11 UTC
Hello Shivaraman :]

Video explaining the gimp "allow to grow" and "grow from center" http://youtu.be/t5S29A7LpIg

Crop tool needs to be able to not only cut, but also add image canvas. This can be a check box. The video lined shows why this behavior is useful. Once you have a Sketch to use the crop to quickly recompose and conform to an aspect ratio (for film or print).

Center crop tool. Having the symmetry tool It's impossible to keep the correct center of the crop when cropping down (cutting). Having a button to center the crop area to the center of the image would be necessary (in my opinion at least). This button could have a combo-box with some other centering options. some suggestions: Center to the image (this one centers the crop area in the middle of the canvas), Center to symmetry axis point (this one centers the crop area to align to the axis point of the symmetry mode) and Center to multibrush axis point (same as the former but this centers using the multibrush Axis point as reference).

Grow from center. This was not in the original bug report but it compliments the "center crop" button. A check box to grow from the center. This is useful to adjust previously centered crop, and also to quickly choose an are of your image to crop. (click and drag and it will grow from center until you get all the portion you want to crop).

If you need more information please don't hesitate to ask, it is not a problem at all
Comment 3 Shivaraman Aiyer 2013-05-24 17:12:52 UTC
Hey Vanyossoi,

Your explanation has been very helpful to understand what you expect out of the whole thing. I have started looking up the code. Will start working as soon as I can :)
Comment 4 David REVOY 2013-06-09 15:27:56 UTC
I really like the two ideas, and they would be also a good addition for my workflow. 
  1)  'Cropping outside' / 'Out-cropping' / 'allow growing' ( can have multiple name )
  2)  And 'growing from center' 

This bug is also related in a way with Bug 318807 : "Crop tool : option to display decoration to help better cropping"
Comment 5 Camilla Boemann 2013-06-18 12:47:42 UTC
I've commited so that it can grow

the centering is not implemented though
Comment 6 Halla Rempt 2013-06-21 11:18:21 UTC
Confirmed and changed the subject to reflect that grow is implemented now.
Comment 7 Halla Rempt 2013-11-13 10:02:58 UTC
Git commit a67d11082a3196704b9322df86dbcc62fa0e394d by Boudewijn Rempt.
Committed on 13/11/2013 at 09:59.
Pushed by rempt into branch 'master'.

Various improvements to the crop tool
Related: bug 327319, bug 327318, bug 327536, bug 326952, bug 326933
CCMAIL: wlingflute@gmail.com
Patch by  Michael Martini. Thanks!

In addition a new decoration type has been added called crosshair. In
summary two new checkboxes have been added. One that allows the user to
either limit the crop to the current image size or grow the crop selection
beyond the image boundaries. The second checkbox enables center growing /
symmetric resizing of the crop bounds.

M  +287  -124  krita/plugins/tools/tool_crop/kis_tool_crop.cc
M  +14   -19   krita/plugins/tools/tool_crop/kis_tool_crop.h
M  +46   -3    krita/plugins/tools/tool_crop/kistoolcropconfigwidget.cpp
M  +7    -2    krita/plugins/tools/tool_crop/kistoolcropconfigwidget.h
M  +25   -0    krita/plugins/tools/tool_crop/wdg_tool_crop.ui

Comment 8 David REVOY 2013-11-13 13:40:50 UTC
Really nice addition. Thanks Michael Martini aka howlingflute on IRC. the checkboxes are also cool. Just a small crit : On the 'decoration' menu, the word 'crosshair' is not consistent with the list 'third' , 'fifth' , I would expect 'half' or 'middle' ( I'm not an english expert ).