Method: Vips::Image#gravity

Defined in:
lib/vips/methods.rb

#gravity(direction, width, height, **opts) ⇒ Vips::Image

Place an image within a larger image with a certain gravity.

Options Hash (**opts):

  • :extend (Vips::Extend)

    How to generate the extra pixels

  • :background (Array<Double>)

    Color for background pixels



# File 'lib/vips/methods.rb', line 339