Class: Riiif::ImageMagickInfoExtractor
- Inherits:
-
AbstractInfoExtractor
- Object
- AbstractInfoExtractor
- Riiif::ImageMagickInfoExtractor
- Defined in:
- app/extractors/riiif/image_magick_info_extractor.rb
Overview
Get information using imagemagick to interrogate the file
Instance Method Summary collapse
Methods inherited from AbstractInfoExtractor
Constructor Details
This class inherits a constructor from Riiif::AbstractInfoExtractor
Instance Method Details
#extract ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/extractors/riiif/image_magick_info_extractor.rb', line 7 def extract height, width, format, channels = Riiif::CommandRunner.execute( "#{external_command} -format '%h %w %m %[channels]' '#{@path}[0]'" ).split(' ') { height: Integer(height), width: Integer(width), format: format, channels: channels } end |