Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.94k stars 327 forks source link

Lock centre of crop growth #2466

Open Beep6581 opened 9 years ago

Beep6581 commented 9 years ago

Originally reported on Google Code with ID 2483

Would be useful to be able to lock down the pivot point that marks the center of growth,
so e.g. if I position a crop with the rule-of-thirds guides and I make the top-left
intersection lie on the eye, I should be able to mark the pivot point at that intersection
so I can grow the crop while keeping the eye on that point. As it is now, it's a game
of grow-move-grow-move-shrink-move until you get it right.

Same thing in GIMP's Unified Transform tool: http://i.imgur.com/qd60Zmk.jpg

Reported by entertheyoni on 2014-08-28 07:01:34

Beep6581 commented 9 years ago
DrSlony, is this a center of growth or center of rotation?
It would be cool to rotate by the corner (another issue)

Reported by michaelezra000 on 2014-08-28 15:09:57

Beep6581 commented 9 years ago
It could be used for both - that's what I use it in GIMP for, to mark the center of
rotation when I fix panorama stitching errors.

Reported by entertheyoni on 2014-08-28 16:40:33

Beep6581 commented 9 years ago

Reported by heckflosse@i-weyrich.de on 2015-03-12 20:51:16

Beep6581 commented 9 years ago
Hombre, I'll need your help at some parts of the crop gui next days. Can you have a
look when I posted the first patch or make a short irc visit?

Ingo

Reported by heckflosse@i-weyrich.de on 2015-03-15 22:51:56

Beep6581 commented 9 years ago
Here's a first mockup.

How to test?

1) open image
2) make a crop with some distance to all borders
3) enable one of this guides (rule of thirds, harmonic means)
4) enter the coordinated of one crossing of the guided in the new controls in crop
tool (the tools with the ugly labels). Of course you can also choose a different point,
but it's easier to observe the behaviour when using one of the crossing points.
5) drag borders or corners of crop, flip or rotate crop, enable/disable Fixed ratio,
switch between portrait and landscape crop => center point should be fixed when doing
this
6) when it's not possible to fix the centre point it will leave it but pop in again
when it's possible.

What's on todo list?

1) move locked centre when moving crop
2) History
3) Centre picker to get rid of the two new controls
4) Centre point is always fixed with patch. Easy to solve for final patch.
...

I posted the patch to get some opinions about the actual implemented behaviour.

Ingo

Reported by heckflosse@i-weyrich.de on 2015-03-18 22:17:06


Beep6581 commented 9 years ago
My editor was set to 'strip trailing blanks'. For that reason the patch is quite large.

Ingo

Reported by heckflosse@i-weyrich.de on 2015-03-18 22:29:48

Beep6581 commented 9 years ago
flip or rotate crop => flip or coarse rotate image with crop enabled

Reported by heckflosse@i-weyrich.de on 2015-03-18 22:45:47

Beep6581 commented 9 years ago

Reported by heckflosse@i-weyrich.de on 2015-03-18 23:42:33

Beep6581 commented 9 years ago
I just recently had a car accident and my head is spinning. But with this changes I
think it will fly off!!!:) Its a funny sensation when the entire crop area moves when
a single side is dragged. I see that it works, but can't see why would it be useful.
I am likely a control freak... so I would always move each side of the crop very precisely:)

While testing the patch, I could accidentally set crop area to 0 and from user experience,
this was confusing. When crop area has no width and no height, one cannot grab sides
to change it. Workaround is to toggle the crop.

I'd prefer that this functionality is optional, via enable pivot point checkbox.

I am not sure if "pivot" is a right term here as it is currently not setting center
of rotation.

Reported by michaelezra000 on 2015-03-19 18:18:12

Beep6581 commented 9 years ago
About the use case, see #0. Though I understand your point that it's not useful when
moving each side of the crop ;-)

Crop area 0 is a different issue. Also possible without patch.

Of course this would be optional!

Ingo

Reported by heckflosse@i-weyrich.de on 2015-03-19 18:37:12

Beep6581 commented 9 years ago
Still not had time to test your patch, but I should be able.to test it during the day.

Reported by natureh.510 on 2015-03-21 10:25:34

Beep6581 commented 9 years ago
Works wonderfully!

Reported by entertheyoni on 2015-03-21 13:47:03

Beep6581 commented 9 years ago
Works almost wonderfully here: after moving the entire crop, resizing one side makes
the other side jump to some position that seems to be related to the initial value
when opening the image.

TP_CROP_CX and _CY is not found.

Reported by natureh.510 on 2015-03-21 21:17:11

Beep6581 commented 9 years ago
Hombre, yes, as I wrote in #5, moving crop with locked centre is still on todo list.
Same for TP_CROP_CX and _CY

Thanks for testing :-)

Ingo

Reported by heckflosse@i-weyrich.de on 2015-03-21 21:42:37

Beep6581 commented 9 years ago

I had to merge some parts by hand, hope it's good. Tested on effb46c3e1fa958951cc6eb84bfcc2456d7379ca not on head. https://gist.github.com/be1378f011a21afa52f5