[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 128293] aspect ratio crop does not respect aspect ratio
From:       Mark Ovens <marko () freebsd ! org>
Date:       2007-01-06 12:46:01
Message-ID: 20070106124601.1445.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=128293         




------- Additional Comments From marko freebsd org  2007-01-06 13:45 -------
I've been looking into this problem. I found that 640x480, 800x600, 1200x900, \
1280x960 always work correctly but 1024x768 and 1152x864 (3:4 aspect ratio, i.e. same \
as a standard PC screen) never work.

If you resize, e.g. maximize, the Aspect Ratio Crop dialogue window then you get \
different errors and even 640x480, 800x600 etc. have errors too.

Looking at the code, what seems to be happening is that it takes the value you enter \
in the Height or Width spin-box and the selected aspect ratio then draws the \
selection rectangle in the preview window. Since the preview is not full-size the \
values have to be scaled. It does this calculation using floating point values then \
casts the results back to integers. Then, it takes the actual size of the selection \
rectangle in the preview window and scales the size back up to full-size (again as a \
floating point calculation with the results cast back to integers) and uses these \
values to populate the Height and Width spin-boxes. Both of these calculations have \
rounding errors so you don't get the values you expect.

What it should do is to apply the aspect ratio to the value - Height or Width - that \
you enter to calculate the other value and use those to draw the selection rectangle \
(which will only be an approximation as the preview is not full-size).

I am working to produce a patch to fix this.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic