Skip to content

Commit

Permalink
use -ping for more efficient IM identify
Browse files Browse the repository at this point in the history
identify with -format will get killed when attempted with higher resolution images. -ping will extract the image metadata with much less resource use.
  • Loading branch information
cziaarm authored Feb 27, 2024
1 parent ddf6138 commit 28d2d1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/iiif_print/image_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def im_identify_geometry(lines)

# @return [Array<String>] 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

Expand Down

0 comments on commit 28d2d1a

Please sign in to comment.