Sha256: 14fa0a77af7f84c88e4f8c41b996247ef2e70435bf855c6e5be61187e30293cd
Contents?: true
Size: 1 KB
Versions: 8
Compression:
Stored size: 1 KB
Contents
module Dragonfly module Encoding class ImageMagickEncoder include Configurable include ImageMagickUtils configurable_attr :supported_formats, [ :ai, :bmp, :eps, :gif, :gif87, :ico, :j2c, :jp2, :jpeg, :jpg, :pbm, :pcd, :pct, :pcx, :pdf, :pict, :pjpeg, :png, :png24, :png32, :png8, :pnm, :ppm, :ps, :psd, :ras, :tga, :tiff, :wbmp, :xbm, :xpm, :xwd ] def encode(temp_object, format, args='') format = format.to_s.downcase throw :unable_to_handle unless supported_formats.include?(format.to_sym) details = identify(temp_object) if details[:format] == format.to_sym && args.empty? temp_object else convert(temp_object, args, format) end end end end end
Version data entries
8 entries across 8 versions & 2 rubygems