Thread View: alt.os.linux.suse
6 messages
6 total messages
Started by Sascha Mrosz
Thu, 27 Feb 2003 20:22
ImageMagick convert
Author: Sascha Mrosz
Date: Thu, 27 Feb 2003 20:22
Date: Thu, 27 Feb 2003 20:22
44 lines
2397 bytes
2397 bytes
Hallo, ich habe folgendes Problem. Ich m�chte s�mtliche Bilder (Bild-01, Bild-02,...) innerhalb eines Verzeichnisses mit dem convert-Befehl von ImageMagick mit einem Text versehen. Hier das Skript: convert Bild-* -font helvetica -fill white -draw "text 10,20 'Foto: Autor'" Bild.jpg PROBLEM: Sobald das Skript jedoch durchgelaufen ist, befinden sich die mit dem Text versehenen Bilder in dem Vezeichnis, doch die Z�hlweise ist sehr merkw�rdig. Ich bekomme immer folgendes Ergebnis: Die Bilder sind merkw�rdig numeriert: Bild.jpg.0 Bild.jpg.1 ... Bild.jpg.10 ... ... Bild.jpg.20 Wie bringe ich Imagemagick nun dazu, die Bilder wiefolgt zu schreiben: Bild-01.jpg Bild-02.jpg ... Bild-10.jpg ... ... Bild-20.jpg Vielleicht hat ja jemand einen guten Tipp. Ich w�re sehr dankbar. MFG Sascha
Re: ImageMagick convert
Author: Bruce
Date: Fri, 28 Feb 2003 01:56
Date: Fri, 28 Feb 2003 01:56
7 lines
1320 bytes
1320 bytes
Sascha Mrosz wrote: > Hallo, > > ich habe folgendes Problem. Du hast ein grosser problem. Warum spammen sie diese englishen Gruppen mit deutsch?
Re: ImageMagick convert
Author: BobT
Date: Fri, 28 Feb 2003 02:25
Date: Fri, 28 Feb 2003 02:25
37 lines
1823 bytes
1823 bytes
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
Re: ImageMagick convert
Author: 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
Re: ImageMagick convert
Author: Sascha Mrosz
Date: Fri, 28 Feb 2003 12:18
Date: Fri, 28 Feb 2003 12:18
24 lines
1734 bytes
1734 bytes
Hello Bruce, In deed, I did not want to spam this group. As I have seen over the last few months several messages in german, I thought I could post it here. As I see, it is not common to post german questions here. Ok, in the future I will pst my questions in english. And, by the way, I am not austrian, but german 8-). But that is not really important. Anyway, Torsten posted a good script that solved the problem I had. Thank you Torsten. Sascha Bruce wrote: > Sascha Mrosz wrote: >> Hallo, >> >> ich habe folgendes Problem. > > Du hast ein grosser problem. > Warum spammen sie diese englishen Gruppen mit deutsch?
Re: ImageMagick convert
Author: Glenn Randers-Pehrson
Date: Fri, 28 Feb 2003 14:25
Date: Fri, 28 Feb 2003 14:25
47 lines
2425 bytes
2425 bytes
Sascha Mrosz <sascha@mrosz.de> wrote in message news:<b3ls2j$6ke$03$2@news.t-online.com>...
> Hallo,
>
> ich habe folgendes Problem.
> Ich m�chte s�mtliche Bilder (Bild-01, Bild-02,...) innerhalb eines
> Verzeichnisses mit dem convert-Befehl von ImageMagick mit einem Text
> versehen.
>
> Hier das Skript:
> convert Bild-* -font helvetica -fill white -draw "text 10,20 'Foto: Autor'"
> Bild.jpg
>
> PROBLEM:
> Sobald das Skript jedoch durchgelaufen ist, befinden sich die mit dem Text
> versehenen Bilder in dem Vezeichnis, doch die Z�hlweise ist sehr
> merkw�rdig.
>
> Ich bekomme immer folgendes Ergebnis:
>
> Die Bilder sind merkw�rdig numeriert:
>
> Bild.jpg.0
> Bild.jpg.1
> ...
> Bild.jpg.10
> ...
> ...
> Bild.jpg.20
>
>
> Wie bringe ich Imagemagick nun dazu, die Bilder wiefolgt zu schreiben:
>
> Bild-01.jpg
> Bild-02.jpg
> ...
> Bild-10.jpg
> ...
> ...
> Bild-20.jpg
>
> Vielleicht hat ja jemand einen guten Tipp.
> Ich w�re sehr dankbar.
convert Bild-* -font helvetica -fill white -draw "text 10,20 'Foto: Autor'"
Bild-%02d.jpg
Glenn
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads