Sha256: 1eee27bf2ea8f961ddc716512aace66777c0f47efa56f6621bf5fd065fe4206c
Contents?: true
Size: 615 Bytes
Versions: 22
Compression:
Stored size: 615 Bytes
Contents
module Dragonfly module ImageMagick module Generators class Plasma def call(content, width, height, opts={}) format = extract_format(opts) content.generate!(:convert, "-size #{width}x#{height} plasma:fractal", format) content.add_meta('format' => format, 'name' => "plasma.#{format}") end def update_url(url_attributes, width, height, opts={}) url_attributes.name = "plasma.#{extract_format(opts)}" end private def extract_format(opts) opts['format'] || 'png' end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems