[magick-users] getting the number of images converted from pdf to
jpg
Anthony Thyssen
anthony at griffith.edu.au
Tue Mar 4 16:42:30 PST 2008
"Scott Faisal" on wrote...
| Hello,
|
|
| I am interested in getting the number of images that were created when i
| performed the
|
| exec("/usr/bin/convert '".$uploadFile."' '".$thumbnailFile."'");
|
| command.
|
| thanks guys
|
Add...
-format %s -identify
just before the final save, and IM will output to stdout the scene
(image) number of each image. Grab the last number and add one
or count the number of lines it outputs.
For example, here is a rose animation that morphs a rose to its
'flipped' form, then back again, with a pause at the ends of the morph.
convert rose: \( +clone -flip \) -set delay 200 \
\( -clone 0,1 -morph 10 -delete 0,-1 -set delay 10 \) \
\( -clone 1 \) -delete 1 \( -clone -2-1 \) \
-format %1 -identify rose_flip.gif
0
1
1
...
20
21
result 22 images (original, flippes, plus two X 10 morphing images.
Synopsis.
read in rose image, create its flips form, set the pause time delay
create just the morphing sequence images, set morph speed
move original 'flipped' image end, duplicate morph images (reversed)
output a count total number of images, and write the resulting animation.
Enjoy
The above example will appear in IM examples at
http://imagemagick.org/Usage/anim_mods/#morph
in a few hours.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
Wiz thought about what it would be like to work with a computer that
killed the programmer every time it crashed and shuddered.
-- Rick Cook, "Wizard's Bane"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list