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?".
linjuming
Posts: 122 Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308
Post
by linjuming » 2011-03-16T21:12:08-07:00
how to get the using time when runing a command?
such as ,I wan to know:
Code: Select all
convert -size 1000x1000 xc:white white.png
convert white.png -resize: 1000x1000 white.png
or use imagick php code to do that
which is faster,how to get the using time?
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Post
by anthony » 2011-03-16T21:20:29-07:00
try using time command
Code: Select all
time convert rose: null
real 0m0.011s
user 0m0.002s
sys 0m0.009s
taht is 0.011 second overall. but only .002 for the actual command, rather than kernel processing
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2011-03-16T21:21:28-07:00
on unix/mac you can use time function
time convert -size 1000x1000 xc:white white.png
time convert white.png -resize: 1000x1000 white.png
or
time convert -size 1000x1000 xc:white PNG:- | convert - white.png -resize: 1000x1000 white.png
or faster
time convert -size 1000x1000 xc:white MIFF:- | convert - white.png -resize: 1000x1000 white.png
or faster yet
time convert -size 1000x1000 xc:white -resize: 1000x1000 white.png
or since the image is constant, then use -scale or -sample rather than -resize and it will be even faster.
or just create it the final size
time convert -size 1000000x1000000 xc:white white.png
Last edited by
fmw42 on 2011-03-16T21:35:45-07:00, edited 3 times in total.
linjuming
Posts: 122 Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308
Post
by linjuming » 2011-03-16T21:32:47-07:00
thanks ,help much!