lib/grim/image_magick_processor.rb in grim-0.3.0 vs lib/grim/image_magick_processor.rb in grim-1.0.0

- old
+ new

@@ -21,17 +21,18 @@ def save(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) command = [@imagemagick_path, "-resize", width.to_s, "-antialias", "-render", - "-quality", quality.to_s, "-colorspace", "RGB", + "-quality", quality.to_s, "-colorspace", colorspace, "-interlace", "none", "-density", density.to_s, "#{Shellwords.shellescape(pdf.path)}[#{index}]", path] command.unshift("PATH=#{File.dirname(@ghostscript_path)}:#{ENV['PATH']}") if @ghostscript_path result = `#{command.join(' ')}` $? == 0 || raise(UnprocessablePage, result) end end -end \ No newline at end of file +end