Page 1 of 1

identify command line tool. eating system resources 100%

Posted: 2007-11-12T17:05:27-07:00
by venaish
Hi,

I am using "identify" command-line tool (imagemagick) to identify color-space and file type of an image.

But when I run the command-line with a 10MB or more file, its eats up my CPU and the CPU usage level goes to 100%.

Can you please tell why the "identify" command-line is taking so much CPU resource to identify a file type.

Is there any solution for this ? please let me know.

Thank you so much.

Regards,
Venkatesh.

Re: identify command line tool. eating system resources 100%

Posted: 2007-11-12T17:12:33-07:00
by magick
Certain attributes or the -verbose option forces the identify command to read the entire image rather than "pinging" it. Pinging only reads the image header and a few important attributes which requires little memory and is quite fast. If you are forced to read the entire image you can force the pixel cache to disk which takes longer but uses little memory resources. Use -limit area 1 on your identify command line to reduce the memory requirements of the identify command.