Bug 158174 - precise aspect ratio crop feature
Summary: precise aspect ratio crop feature
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Crop (show other bugs)
Version: 4.9.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-21 17:58 UTC by Roberto Castagnola
Modified: 2016-06-29 19:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.4


Attachments
ratiocrop-precisecrop.patch (23.30 KB, patch)
2008-02-21 18:06 UTC, Roberto Castagnola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Castagnola 2008-02-21 17:58:40 UTC
Version:            (using KDE 3.5.8)
Installed from:    Compiled From Sources

Next attached patch adds a precise ratio crop feature as suggested by Arnd (Bug 128293 Comment #12).
Comment 1 Roberto Castagnola 2008-02-21 18:06:51 UTC
Created attachment 23652 [details]
ratiocrop-precisecrop.patch

Changes:
- new option to force a precise aspect ratio crop.
- reuse code from applyAspectRatio function when drawing a symmetric selection
with mouse, thus computeAspectRatio function is no more needed.
- few more comments added to code.

Arnd, does it work as you thought?
Comment 2 Arnd Baecker 2008-02-21 20:06:41 UTC
SVN commit 777847 by abaecker:

When using the aspect ratio crop, it is now possible to ensure that the
aspect ratio is fulfilled exactly. This is done by only allowing
those combinations of width/heights which lead to the correct aspect ratio
(thanks to Roberto Castagnola who wrote the patch).

CCBUGS: 158174
TODO:KDE4PORT



 M  +3 -1      NEWS  
 M  +25 -4     imageplugins/coreplugin/ratiocrop/imageeffect_ratiocrop.cpp  
 M  +2 -0      imageplugins/coreplugin/ratiocrop/imageeffect_ratiocrop.h  
 M  +138 -170  imageplugins/coreplugin/ratiocrop/imageselectionwidget.cpp  
 M  +7 -2      imageplugins/coreplugin/ratiocrop/imageselectionwidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=777847
Comment 3 caulier.gilles 2008-02-21 20:19:29 UTC
Roberto, thanls again for this patch...

Arnd, this file is not yet closed...

Gilles

Comment 4 caulier.gilles 2008-02-21 20:21:29 UTC
Arnd,

I'm stupid (:=))). It's not yet closed because the code is not yet ported to KDE4...

Sorry for the sound (:=)))

Gilles
Comment 5 Arnd Baecker 2008-02-21 22:40:38 UTC
Roberto, 

everything works perfect in all the cases I checked.
Thanks a lot for your patch, it is very much appreciated!!

Best wishes,

Arnd
Comment 6 caulier.gilles 2008-03-14 12:31:36 UTC
SVN commit 785562 by cgilles:

digiKam from trunk (KDE4) : Ratio crop tool : backport commit #777847 from KDE3 branch
CCBUGS: 158174


 M  +27 -6     imageeffect_ratiocrop.cpp  
 M  +2 -0      imageeffect_ratiocrop.h  
 M  +140 -171  imageselectionwidget.cpp  
 M  +9 -4      imageselectionwidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=785562
Comment 7 caulier.gilles 2008-03-14 12:45:16 UTC
Roberto,

Your patch have been ported to KDE4 implementation.

But i recommend to test if all work fine for you. Your patch is huge and i hope to not have forget something (:=)))

Thanks in advance

Gilles Caulier
Comment 8 caulier.gilles 2008-03-14 12:54:30 UTC
Screenshot of Showfoto for KDE4 running Ratio Crop tool using "Desert" color scheme theme: 

http://digikam3rdparty.free.fr/Screenshots/FullColorThemeSupport/fullcolortheme6.png

This rock no ???

Gilles Caulier
Comment 9 Mikolaj Machowski 2008-03-14 23:32:55 UTC
> This rock no ???


Yes, it rocks :)
Comment 10 Roberto Castagnola 2008-03-15 11:27:36 UTC
It's a PITA for me to download it with svn at home using 56K modem, and I don't know how to download it at work using windows. Is there any kde4 port snapshot available?
Comment 11 caulier.gilles 2008-03-15 14:31:18 UTC
Roberto,

Yes, there are daily snapshot created automatically by a script hosted by KDE. Look here :

ftp://ftp.kde.org/pub/kde/unstable/snapshots/

Gilles
Comment 12 Roberto Castagnola 2008-03-15 15:24:32 UTC
Gilles,

I will hopefully try it next week, thanks.
Comment 13 caulier.gilles 2008-03-20 14:53:08 UTC
Code is now backported to KDE4. I close this file.