Sha256: cdfce648675930ec5ff01ea62465e3d25aac2e8a42ea7e2637df9ada21a117f0

Contents?: true

Size: 390 Bytes

Versions: 10

Compression:

Stored size: 390 Bytes

Contents

require 'open3'

module Ddr
  module Derivatives
    class PngGenerator < Generator

      def self.output_mime_type
        "image/png"
      end

      def generate
        command = "convert #{Ddr::Utils.file_path(source)} #{options} png:#{Ddr::Utils.file_path(output)}"
        out, err, s = Open3.capture3(command)
        GeneratorResult.new(out, err, s)
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ddr-models-2.3.2 lib/ddr/derivatives/png_generator.rb
ddr-models-2.3.1 lib/ddr/derivatives/png_generator.rb
ddr-models-2.3.0 lib/ddr/derivatives/png_generator.rb
ddr-models-2.2.0 lib/ddr/derivatives/png_generator.rb
ddr-models-2.1.3 lib/ddr/derivatives/png_generator.rb
ddr-models-2.1.2 lib/ddr/derivatives/png_generator.rb
ddr-models-2.1.1 lib/ddr/derivatives/png_generator.rb
ddr-models-2.1.0 lib/ddr/derivatives/png_generator.rb
ddr-models-2.1.0.rc2 lib/ddr/derivatives/png_generator.rb
ddr-models-2.1.0.rc1 lib/ddr/derivatives/png_generator.rb