Class: Blobsterix::Transformations::Impl::GifTransformation
- Inherits:
-
Transformation
- Object
- Transformation
- Blobsterix::Transformations::Impl::GifTransformation
- Defined in:
- lib/blobsterix/transformation/image_transformation.rb
Instance Method Summary collapse
- #input_type ⇒ Object
- #is_format? ⇒ Boolean
- #name ⇒ Object
- #output_type ⇒ Object
- #transform(input_path, target_path, value) ⇒ Object
Methods inherited from Transformation
Methods included from Logable
Instance Method Details
#input_type ⇒ Object
365 366 367 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 365 def input_type() @input_type ||= Blobsterix::AcceptType.new "image/*" end |
#is_format? ⇒ Boolean
361 362 363 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 361 def is_format?() true end |
#name ⇒ Object
357 358 359 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 357 def name() "gif" end |
#output_type ⇒ Object
369 370 371 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 369 def output_type() @output_type ||= Blobsterix::AcceptType.new "image/gif" end |
#transform(input_path, target_path, value) ⇒ Object
373 374 375 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 373 def transform(input_path, target_path, value) raise StandardError.new($?) unless system("convert \"#{input_path}\" gif:\"#{target_path}\"") end |