List Info

Thread: Quiet Gimp script to make screenshots




Quiet Gimp script to make screenshots
country flaguser name
France
2007-02-16 01:50:51
As manual writers we generate a lot of nice screenshots, a
task which can be 
quite tedious. To make life a (little) bit easier I updated
my Gimp script-fu 
to this:

http://digikam3rdparty.free.fr/Tools/kde-scree
nshot-dropshadow.scm

The script creates a dropshadow conforming to KDE standard.
I runs without 
dialog and flattens the layers at the end. So the only
action it to call it 
(from 'Script-Fu'->Utils) and save the screenshot.

This is an update of my previous scripts, which it replaces.
It runs fine on 
Gimp 2.3.14 and should be backwards compatible at least down
to Gimp 2.0 
(because the parser of the recent version is stricter)

And, since I'm at it...
The following command compresses the produced PNG file
considerably (that's 
nice for smaller packages) without visible quality loss:

$ pngnq -s 3 ./*.png && optipng *-nq8.png &&
rename -f s/-nq8.png/.png/ 
*-nq8.png 
Just run it in the screenshot directory from a shell.

Of course you need to have optipng and pngnq installed.

Regards
Gerhard

P.S. 
Project: shell script using Imagemagick with optipng to do
it all at once 
without Gimp
_______________________________________________
Digikam-devel mailing list
Digikam-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/digikam-devel

Re: Quiet Gimp script to make screenshots
country flaguser name
Poland
2007-02-16 13:35:55
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 $x$+0+0 xc:none 
	-draw "fill black rectangle 7,7 $swidth,$sheight"

	-channel RGBA -blur $x$ 
	-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 $x$+0+0 xc:none 
#	-draw "fill black rectangle 7,7
$swidth,$sheight" 
#	-channel RGBA -blur $x$ 
#	-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.

_______________________________________________
Digikam-devel mailing list
Digikam-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/digikam-devel

Re: Quiet Gimp script to make screenshots
country flaguser name
France
2007-02-23 09:55:28
A little bug corrected in my gimp script: the last command
must be 'merge 
layers' and not 'flatten layers'.

The online script is corrected.

Gerhard

_______________________________________________
Digikam-devel mailing list
Digikam-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/digikam-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )