Hi
my crop command is: convert 'file_input.jpg' -crop 5075x12725+153+0! -quality '75' 'file_output.jpg'
Yeah, height is right. We have a 500mb of memory available and it take about 10 mins to complete.
Is there any ways to improve crop performance?
Thanks.
How to speed up
Re: How to speed up
Add -debug cache to your command line. Most likely your image pixels are cached to disk. If you add memory to your system, the pixels are processed in memory instead and the command will run in just a few seconds. You might get a speed-up by using a recent release of ImageMagick.
Re: How to speed up
thanks for advice!
Here is what I got:
convert -debug cache /tmp/input.jpg -crop 5075x12725+153+0! -quality '75' '/tmp/file_output.jpg'
2010-09-02T21:30:34+03:00 0:00.030 0.000u 6.6.1 Cache convert[7910]: cache.c/DestroyPixelCache/1601/Cache
destroy
2010-09-02T21:30:34+03:00 0:00.040 0.010u 6.6.1 Cache convert[7910]: cache.c/OpenPixelCache/4128/Cache
open /tmp/input.jpg[0] (heap memory, 5250x12750 510.7MiB)
2010-09-02T21:30:55+03:00 0:21.680 7.810u 6.6.1 Cache convert[7910]: cache.c/OpenPixelCache/4128/Cache
open /tmp/input.jpg[0] (heap memory, 5075x12725 492.7MiB)
Killed
I don't really care that process was killed. I made it on my laptop just for testing purposes. So how much free memory should I have to crop file in a few secs: ~500 or ~1000Mb ?
Thanks again!
Here is what I got:
convert -debug cache /tmp/input.jpg -crop 5075x12725+153+0! -quality '75' '/tmp/file_output.jpg'
2010-09-02T21:30:34+03:00 0:00.030 0.000u 6.6.1 Cache convert[7910]: cache.c/DestroyPixelCache/1601/Cache
destroy
2010-09-02T21:30:34+03:00 0:00.040 0.010u 6.6.1 Cache convert[7910]: cache.c/OpenPixelCache/4128/Cache
open /tmp/input.jpg[0] (heap memory, 5250x12750 510.7MiB)
2010-09-02T21:30:55+03:00 0:21.680 7.810u 6.6.1 Cache convert[7910]: cache.c/OpenPixelCache/4128/Cache
open /tmp/input.jpg[0] (heap memory, 5075x12725 492.7MiB)
Killed
I don't really care that process was killed. I made it on my laptop just for testing purposes. So how much free memory should I have to crop file in a few secs: ~500 or ~1000Mb ?
Thanks again!
Re: How to speed up
The default ImageMagick build is Q16 or 16-bits per pixels. The required memory is reduced by 1/2 for the Q8 build.
We tried your command on our system and it ran in 2GB of memory and completed in just over 3 seconds.
We tried your command on our system and it ran in 2GB of memory and completed in just over 3 seconds.