class

ImageProcessing::Vips::Processor

Inherits ImageProcessing::Processor < Reference < Object

Constants

SHARPEN_MASK = ::Vips::Image.new_from_array([[-1, -1, -1], [-1, 32, -1], [-1, -1, -1]], 24)

Default sharpening mask that provides a fast and mild sharpen.

Constructors

new(accumulator : BlockArg)
Source

Class methods

load_image(source : BlockArg, loader : Hash(String, OptValue)) : ::Vips::Image

Loads the image on disk into a Vips::Image object. Accepts additional loader-specific options (e.g. interlacing). Afterwards auto-rotates the image to be upright.

Source
save_image(image : ::Vips::Image, path : String, saver : Hash(String, OptValue)) : Nil

Writes the Vips::Image object to disk. This starts the processing pipeline defined in the Vips::Image object. Accepts additional saver-specific options (e.g. quality).

Source
supports_resize_on_load?

See #thumbnail.

Source

Instance methods

composite(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

Overlays the specified image over the current one. Supports specifying composite mode, direction or offset of the overlay image.

Source
remove(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image
Source
resize_and_pad(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

Resizes the image to fit within the specified dimensions and fills the remaining area with the specified background color.

Source
resize_to_cover(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

Resizes the image to cover the specified dimensions, without cropping the excess.

Source
resize_to_fill(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

Resizes the image to fill the specified dimensions, applying any necessary cropping.

Source
resize_to_fit(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

Resizes the image to fit within the specified dimensions.

Source
resize_to_limit(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

Resizes the image to not be larger than the specified dimensions.

Source
rotate(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

Rotates the image by an arbitrary angle.

Source
set(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image

make metadata setter methods chainable

Source
set_type(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image
Source
set_value(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::Vips::Image
Source

Nested types