Sha256: 2fe2195933f56afa29d48a96566d8c679cadb8bb5c26e0635039c7803999e502

Contents?: true

Size: 452 Bytes

Versions: 7

Compression:

Stored size: 452 Bytes

Contents

require 'open3'

module Ddr
  module Derivatives
    class PngGenerator < Generator

      def self.output_mime_type
        "image/png"
      end

      def self.output_extension
        "png"
      end

      def generate(source_path, output_path)
        command = "convert #{source_path} #{options} png:#{output_path}"
        out, err, s = Open3.capture3(command)
        GeneratorResult.new(output_path, out, err, s)
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ddr-models-3.0.0.beta.3 lib/ddr/derivatives/generators/png_generator.rb
ddr-models-3.0.0.beta.2 lib/ddr/derivatives/generators/png_generator.rb
ddr-models-3.0.0.beta.1 lib/ddr/derivatives/generators/png_generator.rb
ddr-models-3.0.0.alpha.4 lib/ddr/derivatives/generators/png_generator.rb
ddr-models-3.0.0.alpha.3 lib/ddr/derivatives/generators/png_generator.rb
ddr-models-3.0.0.alpha.2 lib/ddr/derivatives/generators/png_generator.rb
ddr-models-3.0.0.alpha.1 lib/ddr/derivatives/generators/png_generator.rb