Adding current number into image and wait 1 second between output

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
Zoker
Posts: 6
Joined: 2016-01-07T02:25:57-07:00
Authentication code: 1151

Adding current number into image and wait 1 second between output

Post by Zoker »

Hi there,

Two questions:

1. I want to add the current number (%d) of the image at the right bottom corner in red. I read the annotation doc, but they just many things, about how to place it, so it's readable. I don't need that. I only want to place it there.
How can I do that? How can I set the font size?

2. I want to output images with different timestamp. Because imagemagick outputs them so fast, that many of them have the same timestamp. So I just want the command line to wait for 1 second, before outputting the next image.
How can I do that?

Thank you very much!
Zoker
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Adding current number into image and wait 1 second between output

Post by fmw42 »

What is your exact command line?

Always best to provide your IM version and platform when asking questions.

See viewtopic.php?f=1&t=9620
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Adding current number into image and wait 1 second between output

Post by fmw42 »

I do not think you can do either.

1) If you do

Code: Select all

convert rose: logo: -font arial -pointsize 14 -fill green1 -gravity southeast -annotate +0+0 "%s" image_%d.png
Both images get annotated with the scene number of the first image in the sequence.

2) I do not think there is a way to delay in a given command unless you write a loop and process each image separately and put a delay in the loop. But then you won't get different numbers attached to the file name unless you code that into the command sequence via the loop index.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Adding current number into image and wait 1 second between output

Post by snibgo »

fmw42 wrote:convert rose: logo: -font arial -pointsize 14 -fill green1 -gravity southeast -annotate +0+0 "%s" image_%d.png
"%p" instead of "%s" will do that job.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Adding current number into image and wait 1 second between output

Post by fmw42 »

snibgo wrote:
fmw42 wrote:convert rose: logo: -font arial -pointsize 14 -fill green1 -gravity southeast -annotate +0+0 "%s" image_%d.png
"%p" instead of "%s" will do that job.
Thanks, snibgo. I missed that in the list of string format.
Post Reply