Class: Blobsterix::Transformations::Impl::AdaptiveResizeImage
- Inherits:
-
Transformation
- Object
- Transformation
- Blobsterix::Transformations::Impl::AdaptiveResizeImage
- Defined in:
- lib/blobsterix/transformation/image_transformation.rb
Instance Method Summary collapse
- #input_type ⇒ Object
- #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
46 47 48 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 46 def input_type() @input_type ||= Blobsterix::AcceptType.new "image/*" end |
#name ⇒ Object
43 44 45 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 43 def name() "aresize" end |
#output_type ⇒ Object
50 51 52 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 50 def output_type() @output_type ||= Blobsterix::AcceptType.new "image/*" end |
#transform(input_path, target_path, value) ⇒ Object
54 55 56 57 58 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 54 def transform(input_path, target_path, value) image = MiniMagick::Image.open(input_path) image.adaptive_resize value image.write target_path end |