How to delay between conversions

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
DeadPark

How to delay between conversions

Post by DeadPark »

i'm trying to convert an e-book from a .ps file into 100 .png files.

i'm using

Code: Select all

for (( i=1; i <= 100; i++)) {
psselect -q $i book.ps book$i.ps
convert book$i.ps book$i.png
rm -f book$i.ps
}
what i want to know is, how can i make it pause a few seconds between pictures? the reason i ask is because after i convert the book into images, i want to send it to my psp. and anyone that owns a psp knows that it sorts the pictures by order of creation. even though the converter is converting them in order, it does it so fast that occasionally, page 3 will finish a split second before page 2, so the page order is all messed up on the psp.

if i could make it pause for a second or two between pages, that would clear everything up.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to delay between conversions

Post by fmw42 »

try shell command sleep

http://www.ss64.com/bash/sleep.html
DeadPark

Re: How to delay between conversions

Post by DeadPark »

^_^ i'm still new to using shell commands. where would i put that command, and how would i write it?
DeadPark

Re: How to delay between conversions

Post by DeadPark »

oh, nevermind. i played with it and got it to work

thank you so much, that's exactly what i needed, that should fix it.

of course it's going to take a lot longer, but it'll read right, so it's a trade off
Post Reply