how to speed up convert with label?
Posted: 2015-05-20T06:36:46-07:00
I'm generating pictures with text on a neutral background, to convert to video. Originally, I used something like this:
It takes 31 seconds for the 51 pictures. (on a 6 years old laptop ...)
I then tried tiff. It is much faster ( 8.7 seconds), but the files are over 400 times bigger (16'598K vs 39K).
Adding compression to tiff slows it down, and the files are still much bigger. I tried lzw and zip. With lzw, time went up 25% (10.7 seconds) for a size of 260K. Zip made small files (40K, not much bigger than .png), but time was 16.6 seconds.
Are there any tricks to speed up this image generation? In reality, I'm not generating 50 images, but thousands, so both speed and size do make quite a difference.
Thanks for any suggestions.
(ImageMagick 6.6.9-7 2014-03-06 Q16 on Ubuntu 12.04LTS)
Code: Select all
time for i in `seq 0 50 `; do \
convert -background "#666666" -fill "#99CCFF" -font "$font" \
-size 1920x1080 -gravity center -pointsize $((1080/8)) \
label:"image $i" $(printf "test-%06d.png" $i); \
done
I then tried tiff. It is much faster ( 8.7 seconds), but the files are over 400 times bigger (16'598K vs 39K).
Adding compression to tiff slows it down, and the files are still much bigger. I tried lzw and zip. With lzw, time went up 25% (10.7 seconds) for a size of 260K. Zip made small files (40K, not much bigger than .png), but time was 16.6 seconds.
Are there any tricks to speed up this image generation? In reality, I'm not generating 50 images, but thousands, so both speed and size do make quite a difference.
Thanks for any suggestions.
(ImageMagick 6.6.9-7 2014-03-06 Q16 on Ubuntu 12.04LTS)