class

Vips::Image

Inherits Reference < Object

Constructors

new(ptr : Pointer(LibVips::VipsImage), take_ownership : Bool = true)
Source
new_from_array(array : Array, scale : Int32 = 1) : Image
Source
new_from_file(path : String, options : Hash(String, Value)) : Image

Loads an image from disk using the operation that libvips picks for the filename (e.g. "jpegload"). Raises Vips::Error for unknown formats.

Source
new_from_file(path : String, **options) : Image
Source
thumbnail(filename : String, width : Int32 | Nil, height : Int32 | Nil, options : Hash(String, Value)) : Image
Source
thumbnail(filename : String, width : Int32 | Nil, height : Int32 | Nil = nil, **options) : Image
Source

Instance methods

add_alpha

libvips removed the dedicated "add_alpha" operation; append a constant band holding the maximum alpha value of the image's format.

Source
autorot
Source
bands
Source
composite(overlay : Image, mode, options : Hash(String, Value)) : Image
Source
composite(overlays : Array(Image), mode, options : Hash(String, Value)) : Image
Source
composite(overlay : Image, mode, **options) : Image
Source
composite(overlays : Array(Image), mode, **options) : Image
Source
conv(mask : Image, options : Hash(String, Value)) : Image
Source
conv(mask : Image, **options) : Image
Source
copy
Source
format
Source
get(name : String) : OpResult
Source
get_fields
Source
gravity(direction : Symbol | String, width : Int32, height : Int32, options : Hash(String, Value)) : Image
Source
gravity(direction : Symbol | String, width : Int32, height : Int32, **options) : Image
Source
has_alpha?
Source
height
Source
remove(name : String) : Bool
Source
rot(angle : Symbol | String) : Image
Source
rot180
Source
rot270
Source
rot90
Source
run_operation(name : String, args : Array(Value), options : Hash(String, Value), block : Proc(Vips::Image | MiniMagick::Tool | String, Vips::Image | MiniMagick::Tool | String | Nil) | Nil = nil) : OpResult | Nil

Dispatches an arbitrary operation with self as the first input, used by ImageProcessing::Processor for operations not defined above.

Source
set(name : String, value : Value) : Nil
Source
set_type(gtype : UInt64, name : String, value : Value) : Nil
Source
set_value(name : String, value : Value) : Nil
Source
similarity(options : Hash(String, Value)) : Image
Source
similarity
Source
size
Source
thumbnail_image(width : Int32 | Nil, height : Int32 | Nil, options : Hash(String, Value)) : Image
Source
thumbnail_image(width : Int32 | Nil, height : Int32 | Nil = nil, **options) : Image
Source
to_unsafe
Source
width
Source
write_to_file(path : String, options : Hash(String, Value)) : Nil
Source
write_to_file(path : String, **options) : Nil
Source

Macros

method_missing(call)

Any undefined method is turned into a vips operation call with the image as the first argument (mirrors ruby-vips' method_missing).

Source