class ImageVise::Geom

Applies a transformation using an ImageMagick geometry string

The corresponding Pipeline method is `geom`.

Public Class Methods

new(*) click to toggle source
Calls superclass method
# File lib/image_vise/operators/geom.rb, line 5
def initialize(*)
  super
  self.geometry_string = geometry_string.to_s
  raise ArgumentError, "the :geom parameter must be present and not empty" if self.geometry_string.empty?
end

Public Instance Methods

apply!(image) click to toggle source
# File lib/image_vise/operators/geom.rb, line 11
def apply!(image)
  image.change_geometry(geometry_string) { |cols, rows, _| image.resize!(cols,rows) }
end