Method: Processing::Image#resize

Defined in:
lib/processing/image.rb

#resize(width, height) ⇒ nil

Resizes image.

Parameters:

  • width (Numeric)

    width for resized image

  • height (Numeric)

    height for resized image

Returns:

  • (nil)

    nil

See Also:



142
143
144
145
146
147
# File 'lib/processing/image.rb', line 142

def resize(width, height)
  @image = Rays::Image.new(width, height).paint do |painter|
    painter.image getInternal__, 0, 0, width, height
  end
  nil
end