Class: Blobsterix::Transformations::Impl::StripImage
- Inherits:
-
Transformation
- Object
- Transformation
- Blobsterix::Transformations::Impl::StripImage
- 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
122 123 124 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 122 def input_type() @input_type ||= Blobsterix::AcceptType.new "image/*" end |
#is_format? ⇒ Boolean
130 131 132 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 130 def is_format?() true end |
#name ⇒ Object
119 120 121 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 119 def name() "strip" end |
#output_type ⇒ Object
126 127 128 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 126 def output_type() @output_type ||= Blobsterix::AcceptType.new "image/*" end |
#transform(input_path, target_path, value) ⇒ Object
134 135 136 137 138 139 |
# File 'lib/blobsterix/transformation/image_transformation.rb', line 134 def transform(input_path, target_path, value) image = MiniMagick::Image.open(input_path) image.strip image.write target_path # system("convert #{input_path} -strip #{target_path}") end |