From 28d2d1ae787cdc92f111afc0881aa5c02f9f4faf Mon Sep 17 00:00:00 2001 From: Rory McNicholl Date: Tue, 27 Feb 2024 10:41:17 +0000 Subject: [PATCH] use -ping for more efficient IM identify identify with -format will get killed when attempted with higher resolution images. -ping will extract the image metadata with much less resource use. --- lib/iiif_print/image_tool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iiif_print/image_tool.rb b/lib/iiif_print/image_tool.rb index 8d6df030..be27ac92 100644 --- a/lib/iiif_print/image_tool.rb +++ b/lib/iiif_print/image_tool.rb @@ -74,7 +74,7 @@ def im_identify_geometry(lines) # @return [Array] lines of output from imagemagick `identify` def im_identify - cmd = "identify -format 'Geometry: %G\nDepth: %[bit-depth]\nColorspace: %[colorspace]\nAlpha: %A\nMIME type: %m\n' #{path}" + cmd = "identify -ping -format 'Geometry: %G\nDepth: %[bit-depth]\nColorspace: %[colorspace]\nAlpha: %A\nMIME type: %m\n' #{path}" `#{cmd}`.lines end