Class Region
Wrap a VipsRegion object.
Implements
Inherited Members
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class Region : VipsObject, IDisposable
Remarks
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. At least libvips 8.8 is needed.
Properties
Height
Height of pixels held by region.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
int |
Width
Width of pixels held by region.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Fetch(int, int, int, int)
Fetch an area of pixels.
Declaration
public byte[] Fetch(int left, int top, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | left | Left edge of area to fetch. |
int | top | Top edge of area to fetch. |
int | width | Width of area to fetch. |
int | height | Height of area to fetch. |
Returns
Type | Description |
---|---|
byte[] | An array of bytes filled with pixel data. |
New(Image)
Make a region on an image.
Declaration
public static Region New(Image image)
Parameters
Type | Name | Description |
---|---|---|
Image | image | Image to create this region on. |
Returns
Type | Description |
---|---|
Region | A new Region. |
Exceptions
Type | Condition |
---|---|
VipsException | If unable to make a new region on |