How to grab the converting time?

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
ShanshanZg

How to grab the converting time?

Post by ShanshanZg »

Hi everyone,
I have ubuntu 8.10 64 bit and use convert command to convert png to tiff.
langerd@kauai:~/Desktop$ convert yard_final.png yard_final.tiff
It worked fine.
I need to know how long this converting takes, as it is required for a study. Can anyone tell me the best way to measure the time?

Thanks
Shanshan
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to grab the converting time?

Post by fmw42 »

simply add the word "time" before your IM convert

e.g.

time convert rose: rose.png

Unix will then do the timing and report to the terminal
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to grab the converting time?

Post by magick »

Add -verbose to your command line. The convert program also has a -bench option. The parameter is the number of iterations.
ShanshanZg

Re: How to grab the converting time?

Post by ShanshanZg »

fmw42 wrote:simply add the word "time" before your IM convert

e.g.

time convert rose: rose.png

Unix will then do the timing and report to the terminal
Thanks, this works well.
I got output
real 0m0.042ms
user om0.016s
sys 0m0.024ms

real tells me how much this conversion takes, correct?

Thanks,
Shanshan
Post Reply