class Vips::Region

Overview

Wrap libvips VipsRegion object. A region is a small part of an image. You use regions to read pixels out of images without storing the entire image in memory. Note: At least libvips 8.8 is needed.

Defined in:

vips/region.cr

Constructors

Instance Method Summary

Instance methods inherited from class Vips::VipsObject

get(name : String) get, get_blurb(name : String) get_blurb, get_description get_description, get_pspec(name : String) : LibVips::GParamSpec | Nil get_pspec, get_typeof(name : String) get_typeof, post_close(&block : -> ) post_close, print_all print_all, set(gtype, name, value)
set(options : String)
set

Instance methods inherited from class Vips::GObject

finalize finalize, get(name : String, gval : GValue) get, object_ref object_ref, ref_count ref_count, release_handle release_handle, set(name : String, gval : GValue) set, signal_connect(signal : String, callback : Proc, data : Pointer(Void) = Pointer(Void).null) : LibVips::Gulong signal_connect, signal_disconnect(handler_id : LibVips::Gulong)
signal_disconnect(func : Proc, data : Pointer(Void) = Pointer(Void).null)
signal_disconnect(data : LibVips::Gpointer)
signal_disconnect

Constructor Detail

def self.new(image : Image) #

Make a region on an image


[View source]

Instance Method Detail

def fetch(left : Int32, top : Int32, width : Int32, height : Int32) : Bytes #

Fetch an area of pixels. left Left edge of area to fetch. top Top edge of area to fetch. width Width of area to fetch. height Height of area to fetch. Returns Bytes filled with pixel data.


[View source]
def height : Int32 #

height of pixels held by region


[View source]
def width : Int32 #

width of pixels held by region


[View source]