Sha256: 796cceafba4bd55330acc1b6ac38e2f8323cb7447e428397cf249907be1f5077
Contents?: true
Size: 544 Bytes
Versions: 24
Compression:
Stored size: 544 Bytes
Contents
module Dragonfly module ImageMagick module Analysers class ImageProperties def call(content) identify_command = content.env[:identify_command] || 'identify' details = content.shell_eval do |path| "#{identify_command} -ping -format '%m %w %h' #{path}" end format, width, height = details.split { 'format' => format.downcase, 'width' => width.to_i, 'height' => height.to_i } end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems