identify command line tool. eating system resources 100%

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
venaish

identify command line tool. eating system resources 100%

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
Post Reply