Class Region
Wrap a NetVips.Internal.VipsRegion object.
Inheritance
System.Object
System.Runtime.ConstrainedExecution.CriticalFinalizerObject
System.Runtime.InteropServices.SafeHandle
Region
Implements
System.IDisposable
Inherited Members
System.Runtime.InteropServices.SafeHandle.handle
System.Runtime.InteropServices.SafeHandle.Close()
System.Runtime.InteropServices.SafeHandle.DangerousAddRef(System.Boolean)
System.Runtime.InteropServices.SafeHandle.DangerousGetHandle()
System.Runtime.InteropServices.SafeHandle.DangerousRelease()
System.Runtime.InteropServices.SafeHandle.Dispose()
System.Runtime.InteropServices.SafeHandle.Dispose(System.Boolean)
System.Runtime.InteropServices.SafeHandle.SetHandle(System.IntPtr)
System.Runtime.InteropServices.SafeHandle.SetHandleAsInvalid()
System.Runtime.InteropServices.SafeHandle.IsClosed
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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
| Improve this Doc View SourceHeight
Height of pixels held by region.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Width
Width of pixels held by region.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceFetch(Int32, Int32, Int32, Int32)
Fetch an area of pixels.
Declaration
public byte[] Fetch(int left, int top, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | Left edge of area to fetch. |
System.Int32 | top | Top edge of area to fetch. |
System.Int32 | width | Width of area to fetch. |
System.Int32 | height | Height of area to fetch. |
Returns
Type | Description |
---|---|
System.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 |
Implements
System.IDisposable