[Digikam-devel] [Bug 128293] aspect ratio crop does not respect aspect ratio

Roberto Castagnola roberto.castagnola at gmail.com
Tue Jan 29 11:06:52 GMT 2008

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

------- Additional Comments From roberto.castagnola gmail com  2008-01-29 12:06 -------
Created an attachment (id=23349)
 --> (http://bugs.kde.org/attachment.cgi?id=23349&action=view)
ratiocrop-width-height-ratio.patch (add-on)

To be applied after digikam-0.9.3-ratiocrop.patch.

With this patch, aspect ratio is computed using width ratio value and height
ratio value. This should ensure that if ratio=r_h:r_w and we specify
height=i*r_h, we will always get width=i*r_w solving an issue with custom
aspect ratio Arnd reported to me.

Further it changes Aspect ratio ComboBox text to take orientation into account:
if current orientation is Landscape, you will read 3:2 - 4:3 - 5:4 - 7:5 - 10
:7; if current orientation is Portrait, you will read 2:3 - 3:4 - 4:5 - 5:7 -

Even custom aspect ratio take orientation and auto checkButton into account.
Suppose current custom ratio is 800:600 (landscape orientation):
- if you change orientation, ratio values order is reversed (600:800)
- if you change first value to 400 and auto is checked, custom ratio became
400:600 and orientation became Portrait
- if you change first value to 400 and auto is unchecked, second ratio value is
changed to 400 (ratio became 400:400) to ensure that with landscape orientation
first value >= second value.

At last, I moved width and height center buttons near to X and Y input widgets
(by now they are near Width and Height input widgets) since they change
selection position and not his size.

Please test and let me know if it introduces new bugs.

More information about the Digikam-devel mailing list