lib/grim/image_magick_processor.rb
# ghostscript prints out a warning, this regex matches it
ghostscript prints out a warning, this regex matches it
ghostscript prints out a warning this regex matches it
def prepare_command(pdf, index, path, options)
      width      = options.fetch(:width,   Grim::WIDTH)
      density    = options.fetch(:density, Grim::DENSITY)
      quality    = options.fetch(:quality, Grim::QUALITY)
      colorspace = options.fetch(:colorspace, Grim::COLORSPACE)
      alpha      = options[:alpha]
      command = []
      command << @imagemagick_path
      command << "-resize #{width}"
      command << "-alpha #{alpha}" if alpha
      command << "-antialias"
      command << "-render"
      command << "-quality #{quality}"
      command << "-colorspace #{colorspace}" unless colorspace.nil?
      command << "-interlace none"
      command << "-density #{density}"
      command << "#{Shellwords.shellescape(pdf.path)}[#{index}]"
      command << Shellwords.shellescape(path)
      command
    end
def prepare_command ( pdf , index , path , options ) width = options . fetch ( :width , Grim :: WIDTH ) density = options . fetch ( :density , Grim :: DENSITY ) quality = options . fetch ( :quality , Grim :: QUALITY ) colorspace = options . fetch ( :colorspace , Grim :: COLORSPACE ) alpha = options [ :alpha ] command = [ ] command << @imagemagick_path command << "-resize #{width}" command << "-alpha #{alpha}" if alpha command << "-antialias" command << "-render" command << "-quality #{quality}" command << "-colorspace #{colorspace}" unless colorspace . nil? command << "-interlace none" command << "-density #{density}" command << "#{Shellwords.shellescape(pdf.path)}[#{index}]" command << Shellwords . shellescape ( path ) command end
ghostscript prints out a warning, this regex matches it
ghostscript prints out a warning this regex matches it
pdf
<not_specific>
index
<not_specific>
path
<not_specific>
options
<not_specific>