script to loop create a bunch of files , text increments on
Posted: 2008-05-31T23:27:45-07:00
Friends,
I have done some simple ( scale a dir full of images) things with IM --
But here is something that I am unable to do.
goal :: create 300 pngs , size = 720x480 , each is Black with white text of 1 incrementing to 300 , 0-300.pngs
and of course -- if I knew how to make 10 -- that would be great.
I have tried a linux shell and a win version
--------------------( linix
in a file make300.sh
#!/bin/sh
for i while i<300
do
echo $i
mogrify -normalize \\
-size 720 x 480 \\
-bordercolor yellow -border 5 \\
-fill white \\
-font \\
-*-Times \\
-gravity center \\
-draw 'text 20,20 $i\\
$i.png
$i=$i+1
done
--------------------( win
in a file make300.bat
---
LOAD DLL "CORE_RL_wand_.dll"
CALL DLL "MagickWandGenesis"
m_wand = CALL DLL "NewMagickWand"
if m_wand$ = 0 then NewMagickWand failed
err = CALL DLL "MagickReadImage",m_wand$,"logo:"
if err$ = 0 then the read failed
for i while i<300
do
echo $i
mogrify -normalize \\
-size 720 x 480 \\
-bordercolor yellow -border 5 \\
-fill white \\
-font \\
-*-Times \\
-gravity center \\
-draw 'text 20,20 $i\\
CALL DLL "MagickWriteImage",m_wand$,$i.png
$i=$i+1
CALL DLL "MagickWandTerminus"
----------------
Any assistance would be appreciated !
thanks
z
I have done some simple ( scale a dir full of images) things with IM --
But here is something that I am unable to do.
goal :: create 300 pngs , size = 720x480 , each is Black with white text of 1 incrementing to 300 , 0-300.pngs
and of course -- if I knew how to make 10 -- that would be great.
I have tried a linux shell and a win version
--------------------( linix
in a file make300.sh
#!/bin/sh
for i while i<300
do
echo $i
mogrify -normalize \\
-size 720 x 480 \\
-bordercolor yellow -border 5 \\
-fill white \\
-font \\
-*-Times \\
-gravity center \\
-draw 'text 20,20 $i\\
$i.png
$i=$i+1
done
--------------------( win
in a file make300.bat
---
LOAD DLL "CORE_RL_wand_.dll"
CALL DLL "MagickWandGenesis"
m_wand = CALL DLL "NewMagickWand"
if m_wand$ = 0 then NewMagickWand failed
err = CALL DLL "MagickReadImage",m_wand$,"logo:"
if err$ = 0 then the read failed
for i while i<300
do
echo $i
mogrify -normalize \\
-size 720 x 480 \\
-bordercolor yellow -border 5 \\
-fill white \\
-font \\
-*-Times \\
-gravity center \\
-draw 'text 20,20 $i\\
CALL DLL "MagickWriteImage",m_wand$,$i.png
$i=$i+1
CALL DLL "MagickWandTerminus"
----------------
Any assistance would be appreciated !
thanks
z