[Digikam-devel] Quiet Gimp script to make screenshots
Mikolaj Machowski
mikmach at wp.pl
Fri Feb 16 19:35:55 GMT 2007
Dnia piątek 16 luty 2007, Gerhard Kulzer napisał:
> Project: shell script using Imagemagick with optipng to do it all at
> once without Gimp
I wrote IM script for that long time ago. Should be in archives of the
list.
OK, found it. Looks like -fx changed between 6.2 and 6.3, after
necessary fixes it is here:
------------------------------------------------------------
#!/bin/bash
#
# Author: (c) Mikolaj Machowski 2005-2007
# License: GPL
# About: script to produce shadows, look correspondents to shadows of
photos in
# manual of digiKam http://www.digikam.org
# Requires: ImageMagick 6.3 http://www.imagemagick.org
name=$1
radius=0
sigma=3.5
stran=0.80
width=`identify -format %w $name`
height=`identify -format %h $name`
bgwidth=$(($width+15))
bgheight=$(($height+15))
swidth=$(($width+7))
sheight=$(($height+7))
convert -size ${bgwidth}x${bgheight}+0+0 xc:none \
-draw "fill black rectangle 7,7 $swidth,$sheight" \
-channel RGBA -blur ${radius}x${sigma} \
-channel A -fx "a*$stran" \
-draw "fill black line 0,0 0,$(($height+1))" \
-draw "fill black line 0,0 $(($width+1)),0" \
-draw "fill black line 0,$(($height+2)), $(($width+2)),$(($height+2))" \
-draw "fill black line $(($width+2)),0 $(($width+2)),$(($height+2))" \
-draw "image Over 1,1 $width,$height $name" final-$name
#convert -size ${bgwidth}x${bgheight}+0+0 xc:none \
# -draw "fill black rectangle 7,7 $swidth,$sheight" \
# -channel RGBA -blur ${radius}x${sigma} \
# -channel A -fx "a*$stran" \
# -draw "image Over 0,0 $width,$height $name" final-$name
------------------------------------------------------------
Commented version is for images which don't require 1pixel frame around
them, I use it rarely and not useful for Digikam manual photos.
m.
More information about the Digikam-devel
mailing list