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?".
Functionally it is working fine. But, for any 1000 x 1000 resolution image it takes around 700ms! Which is much bigger from my application stand point.
How can I optimize above command to get response faster?
Following are my system details: Windows: Windows 10 Pro
Version: ImageMagick 7.0.7-1 Q16 x64 2017-09-09
Features: Cipher DPC Modules OpenMP
Resource limits:
Width: 214.748MP
Height: 214.748MP
Area: 8.39149GP
Memory: 3.90759GiB
Map: 7.81519GiB
Disk: unlimited
File: 1536
Thread: 4
Throttle: 0
Time: unlimited
I am very new to IM Thanks in Advance.
Last edited by shoansa on 2017-09-27T05:29:57-07:00, edited 2 times in total.
Also using -depth 8 will have no effect on run time. It is only used to specify the output save depth, and that defaults to the images input depth (probably already 8 bit.
To get a speed improvement (with a loss in quality though not for this type of command) you want to change the compile time "Quality" setting.
However like snibgo has mentioned most of the time will be involved in the I/O of the image files. There are ways to make this faster, the best being to keep the images in memory until all your processing is complete, That is if you do have more processing of the images.
When the output is PNG, the "quality" does not affect image appearance; it only affects the amount of compression. For your task, try "-quality 50" or "-quality 40", then adjust until you are happy with the compression speed and filesize (put this option at the end, just before "result.png" on your commandline).
So the easiest improvement will be to use a different file format.
Which file format, can you please specify?
There are ways to make this faster, the best being to keep the images in memory until all your processing is complete, That is if you do have more processing of the images.