Article View: alt.os.linux.suse
Article #110Re: ImageMagick convert
From: torsten
Date: Fri, 28 Feb 2003 06:00
Date: Fri, 28 Feb 2003 06:00
69 lines
3022 bytes
3022 bytes
On Fri the 28 Feb 2003 at 10 hours EST
B wrote...
>Bruce wrote:
>> Sascha Mrosz wrote:
>>
>>> Hallo,
>>>
>>> ich habe folgendes Problem.
>>
>>
>> Du hast ein grosser problem.
>> Warum spammen sie diese englishen Gruppen mit deutsch?
>>
>>
>
>Sascha's not trying to spam us - s/he's asking how to get imagemagick to
>output a series of jpegs with the file extentions intact ie,
>
>pic-1.jpeg
>pic-2.jpeg
>etc
>
>as opposed to;
>
>pic.jpeg.1
>pic.jpeg.2
>etc
>
>My guess is that s/he is Austrian, and believes the aus. in a.c.l is for
>Austria.
>
>I'm not an imagemagick guru, but I suspect the answer will be here
>somewhere.
>
>http://www.imagemagick.org/www/convert.html
>
>
>
>BobT
>
I replied to her with a 4 line bash script to accomplish what
she wanted (from an earlier post on fido.ger.linux), but she
had some difficult figuring out what to do with it.
I trimmed it a little, and sent it, no word.
Here's a copy, for reference.
On the aside, if anyone knows how to specify a leading
zero in a bash script other than the obvious if/then
hack, please let me know. I couldn't figure it out.
--------------------------------------------------------
#!/bin/bash
index=0
for arg in $*
do
let "index += 1"
if (("$index" < "10"))
then convert $arg -font helvetica -fill white -draw "text 10,20 'Foto: Autor'" `basename $arg .${arg#*.}`-0$index.${arg#*.}
else convert $arg -font helvetica -fill white -draw "text 10,20 'Foto: Autor'" `basename $arg .${arg#*.}`-$index.${arg#*.}
fi
done
--------------------------------------------------------
Torsten
Technical Details
Message-ID:
<20030228010037.7a4ebcbb.torsten@inetw.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!logbridge.uoregon.edu!gestalt.direcpc.com!cyclone2.usenetserver.com!newsfeeds-atl1!newsfeeds-atl2!news.webusenet.com!newsread.com!newsprint.netaxs.com!POSTED.monger.newsread.com!not-for-mailReferences:
<b3ls2j$6ke$03$2@news.t-online.com> <3E5EC1B4.5050605@here.nor.there> <3e5ec8ad$0$3385@echo-01.iinet.net.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1041dd,52b53c0f7ca395eb X-Google-Attributes: gid1041dd,public X-Google-Thread: 102983,52b53c0f7ca395eb X-Google-Attributes: gid102983,public X-Google-ArrivalTime: 2003-02-27 22:01:14 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!logbridge.uoregon.edu!gestalt.direcpc.com!cyclone2.usenetserver.com!newsfeeds-atl1!newsfeeds-atl2!news.webusenet.com!newsread.com!newsprint.netaxs.com!POSTED.monger.newsread.com!not-for-mail From: torsten <torsten@inetw.net> Newsgroups: alt.os.linux.suse,aus.computers.linux Subject: Re: ImageMagick convert Message-ID: <20030228010037.7a4ebcbb.torsten@inetw.net> References: <b3ls2j$6ke$03$2@news.t-online.com> <3E5EC1B4.5050605@here.nor.there> <3e5ec8ad$0$3385@echo-01.iinet.net.au> X-Newsreader: Sylpheed version 0.8.10claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Lines: 69 Date: Fri, 28 Feb 2003 06:00:29 GMT NNTP-Posting-Host: 209.208.85.70 X-Complaints-To: Abuse Role <abuse@atlantic.net>, We Care <abuse@newsread.com> X-Trace: monger.newsread.com 1046412029 209.208.85.70 (Fri, 28 Feb 2003 01:00:29 EST) NNTP-Posting-Date: Fri, 28 Feb 2003 01:00:29 EST Organization: Atlantic.net (atlantic.net)