Image Magick commands are taking time on server
Posted: 2017-09-14T08:58:54-07:00
Hi Geeks,
We are using sequence of commands to generate one output through imagemagic command.
Image used in first command is here - http://solaceinfotech.com/projects/tmp/ ... 50373.jpeg
Just for quick reference, here is what each command does.
Here are the commands.
1. Resizing the original image and generate the TEMP.>> 9 seconds
2. Copy the image to dummy image.
2. Mogrify it to add extra space as dummy image.>> 8 seconds
3. Apply black color to the image dummy image.>> 2 seconds
4. Place original image in dummy image and say merge image.>> 11 seconds
5. Copy Merge image to first image
6. Mogrify the first image to original width and height.>> 8 seconds
7. Apply color white to first image.>> 1 seconds
8. Assinged the first image to master variable
8. Create a main final image by placing the merge image onto the master image.>> 11 seconds
9. Main final image copied to master image.
10.Draw text 1 on image>> 9 seconds
11.Draw text 2 on image>> 10 seconds
12 Draw QR image on image.>> 10 seconds
My Imagemagic installation details -
Version: ImageMagick 6.9.3-8 Q16 x86_64 2017-06-12
Features: Cipher DPC OpenMP
Execution of above commands take total 82 seconds at my end. Individual timings are mentioned as well above.
Can you please try running these commands at your server with same image and mention me how much total time its taking on your server?
If its taking less time, please mention configuration of your sever and details of Image magic installation.?
We are using sequence of commands to generate one output through imagemagic command.
Image used in first command is here - http://solaceinfotech.com/projects/tmp/ ... 50373.jpeg
Just for quick reference, here is what each command does.
Here are the commands.
Code: Select all
"/usr/bin/convert" 15049951621774150373.jpeg -scale 3600x2400! solace_tmp_0.png
cp solace_tmp_0.png solace_dummy.png
mogrify -extent 3600x2400 -background "#FFFFFF" -gravity Center solace_dummy.png
"/usr/bin/convert" solace_dummy.png -fill black -draw "color 0,0 reset" solace_dummy.png
"/usr/bin/convert" solace_dummy.png -draw "image over 0,0+3600+2400 '15049951621774150373.jpeg'" solace_merge_0.png
cp solace_merge_0.png solace_first.png
mogrify -extent 4800x3600 -background "#FFFFFF" -gravity Center solace_first.png
"/usr/bin/convert" solace_first.png -fill white -draw "color 0,0 reset" solace_first.png
"/usr/bin/convert" solace_first.png -draw "image over 600,600+3600+2400 'solace_merge_0.png'" solace_main_final.png
cp solace_main_final.png solace_first.png
"/usr/bin/convert" solace_main_final.png -font /fonts/arial/arial.ttf -pointsize 19.935 -fill red -annotate +0+3596 " Text 1 " solace_main_final.png
"/usr/bin/convert" solace_main_final.png -font /fonts/arial/arial.ttf -pointsize 19.935 -fill black -annotate +0+3596 " Text 2 " solace_main_final.png
"/usr/bin/convert" solace_main_final.png -draw "image over 1453,3521+75+75 'solace_qr_image.png'" solace_main_final.png
1. Resizing the original image and generate the TEMP.>> 9 seconds
2. Copy the image to dummy image.
2. Mogrify it to add extra space as dummy image.>> 8 seconds
3. Apply black color to the image dummy image.>> 2 seconds
4. Place original image in dummy image and say merge image.>> 11 seconds
5. Copy Merge image to first image
6. Mogrify the first image to original width and height.>> 8 seconds
7. Apply color white to first image.>> 1 seconds
8. Assinged the first image to master variable
8. Create a main final image by placing the merge image onto the master image.>> 11 seconds
9. Main final image copied to master image.
10.Draw text 1 on image>> 9 seconds
11.Draw text 2 on image>> 10 seconds
12 Draw QR image on image.>> 10 seconds
My Imagemagic installation details -
Version: ImageMagick 6.9.3-8 Q16 x86_64 2017-06-12
Features: Cipher DPC OpenMP
Execution of above commands take total 82 seconds at my end. Individual timings are mentioned as well above.
Can you please try running these commands at your server with same image and mention me how much total time its taking on your server?
If its taking less time, please mention configuration of your sever and details of Image magic installation.?