[Digikam-devel] [Bug 179548] additional guide for aspect ratio crop

Mikolaj Machowski mikmach at wp.pl
Sat Jan 3 23:34:24 GMT 2009


http://bugs.kde.org/show_bug.cgi?id=179548





--- Comment #2 from Mikolaj Machowski <mikmach wp pl>  2009-01-04 00:34:23 ---
To paraphrase old saying:
"The nice thing about methods is that there are so many to choose from" :)

I ran this simple script (bash, ImageMagick, cut):
------------------------------------------------------------
#!/bin/bash
SIZE=`identify -format "%w %h" $1`
W=`echo $SIZE | cut -d' ' -f1`
H=`echo $SIZE | cut -d' ' -f2`
if [ $H -gt $W ]; then
convert $1 -stroke black \
                   -draw "line 0,0 $W,$W" \
                   -draw "line 0,$W $W,0" \
                   -draw "line 0,$(($H-$W)) $W,$H" \
                   -draw "line 0,$H $W,$(($H-$W))" $1-dm.jpg
else
convert $1 -stroke black \
                   -draw "line 0,0 $H,$H" \
                   -draw "line 0,$H $H,0" \
                   -draw "line $(($W-$H)),0 $W,$H" \
                   -draw "line $(($W-$H)),$H $W,0" $1-dm.jpg
fi
--------------------------------------------------------------------
Over my collection of few thousands of drawings and etchings, from 16th to 20th
century. Results aren't very convincing, but: percentage of images where this
theory is more often correct (although not always) are from beginning of 20th
century onwards. Maybe some new, still existing school of composition? On
Monday I will be able to test it on more examples.


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list