convert (Slow process)
Posted: 2013-04-23T11:24:36-07:00
Hi friends.
I have an application which processes two images and tries to make a fade transition effect, it works very well, but the problem is the performance. I'm running ImageMagick using the CMDMagick.EXE tool. I have a Intel core i5VPro processor and this command takes almost 6 second in construcs 20 images (transition efecct between 2 images).
I tried deleting the dissolve and blur effect, but the saving time is almost 0 second.
Is possible to improve the speed in this command? As you can see, I put all the image generation (20 images) in a sigle command line and it works very good. I tried generate the images separatelly (one command line per image) but it is slower.
I'am a novice imagemagick user. I dont know the technics to impove the speed, if we can save time with special commands or supressing quality in the resultant images or something like that
Best regards,
I have an application which processes two images and tries to make a fade transition effect, it works very well, but the problem is the performance. I'm running ImageMagick using the CMDMagick.EXE tool. I have a Intel core i5VPro processor and this command takes almost 6 second in construcs 20 images (transition efecct between 2 images).
- Microsoft Windows [VersiĆ³n 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.
C:\Users\Elvis>convert -version
Version: ImageMagick 6.8.4-10 2013-04-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jng jp2 jpeg lcms lzma pango png ps tiff x xml zlib
Code: Select all
"...
convert ( "c:\fondo.jpg" "c:\Act.png" -gravity center -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "2%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=41 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "5%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=43 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "7%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=44 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "10%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=46 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "12%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=47 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "C:\PubliScreen\
Temporal\ImaSig0.png" -crop "15%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=49 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "17%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=50 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "20%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=52 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "22%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=53 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "25%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=55 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "27%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=56 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "C:\Pub
liScreen\Temporal\ImaSig0.png" -crop "30%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=58 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "32%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=59 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "35%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=61 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "37%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=62 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "40%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=64 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "42%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=65 -blur 0X2 ) -composite ) ( -clone 0 -gravity west
( "c:\Next.png" -crop "45%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=67 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "47%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=68 -blur 0X2 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "50%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=70 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "52%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=71 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "55%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=73 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "57%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=74 -blur 0X1 ) -composite ) ( -clone 0 -grav
ity west ( "c:\Next.png" -crop "60%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=76 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "62%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=77 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "65%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=79 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "67%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=80 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "70%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=82 -blur 0X1 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "72%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=83 -blur 0X1 ) -composite ) ( -clon
e 0 -gravity west ( "c:\Next.png" -crop "75%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=85 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "77%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=86 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "80%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=88 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "82%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=89 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "85%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=91 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "87%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=92 ) -composite ) ( -clone 0 -gravity west ( "C:\PubliScreen\Temporal\ImaSig
0.png" -crop "90%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=94 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "92%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=95 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "95%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=97 ) -composite ) ( -clone 0 -gravity west ( "c:\Next.png" -crop "97%x648+0+0" -geometry +140.5+0 -compose dissolve -define compose:args=98 ) -composite ) ( ( "c:\fondo.jpg" "c:\Next.png" -compose dissolve -define compose:args=100 ) -gravity center -composite ) "c:\IM.jpg"
..."
Is possible to improve the speed in this command? As you can see, I put all the image generation (20 images) in a sigle command line and it works very good. I tried generate the images separatelly (one command line per image) but it is slower.
I'am a novice imagemagick user. I dont know the technics to impove the speed, if we can save time with special commands or supressing quality in the resultant images or something like that
Best regards,