Click or drag to resize

Raster Class

A raster dataset. A raster consists of one or more bands, or sets of values, which are most commonly associated with colors when the raster represents an image. For instance, a typical color image contains three sets of values, or bands (red, green, and blue) which define the color of pixels within the image. The following raster image formats can be read by the raster class: BMP, ECW, IMG, JP2, NTF, NITF, PNG, SID, TIF, TIFF, JPG, JPEG, PPM, PGM, CLDS, and TGA. The raster can also be loaded from memory, or constructed from a .NET Bitmap. To create a texture from a raster, pass it to the FromRaster(Raster) method.
Inheritance Hierarchy

Namespace:  AGI.Foundation.Graphics.Imaging
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public class Raster : IDisposable

The Raster type exposes the following members.

Constructors
  NameDescription
Public methodRaster(Bitmap)
Initializes a raster from a .NET Bitmap with a supported PixelFormat. Format8bppIndexed, Format24bppRgb, Format32bppRgb, and Format32bppArgb bitmap data are supported.
Public methodRaster(Raster)
Initializes a raster from another raster.
Public methodRaster(String)
Initializes a raster from a Uri, which can be a file, HTTP, HTTPS, or FTP source. See Raster for a list of supported formats.
Public methodRaster(Uri)
Initializes a raster from a Uri, which can be a file, HTTP, HTTPS, or FTP source. See Raster for a list of supported formats.
Public methodRaster(Byte, RasterAttributes)
Initializes a raster from memory.
Public methodRaster(IntPtr, RasterAttributes)
Initializes a raster from memory.
Public methodRaster(String, Int32, Int32, Int32, Int32)
Initializes a raster from a Uri. Only the specified subsection of the raster is read. See Raster for a list of supported formats.
Public methodRaster(Uri, Int32, Int32, Int32, Int32)
Initializes a raster from a Uri. Only the specified subsection of the raster is read. See Raster for a list of supported formats.
Top
Properties
  NameDescription
Public propertyAttributes
Gets the RasterAttributes that define the raster data.
Public propertyHeight
Gets the height of the raster in pixels.
Public propertyScan0
Gets the IntPtr associated with the first value of data in the raster.
Public propertyWidth
Gets the width of the raster in pixels.
Top
Methods
  NameDescription
Public methodApply
Applies a RasterFilter to the raster and returns a new raster with the results of the filtering. The current raster is not modified.
Public methodApplyInPlace
Applies a RasterFilter to the raster. The current raster will contain the results of the filtering.
Public methodCopyFromBitmap
Copies a .NET Bitmap with a supported PixelFormat into this raster. Format8bppIndexed, Format24bppRgb, Format32bppRgb, and Format32bppArgb bitmap data are supported.
Public methodCopyFromMemory(Byte, RasterAttributes)
Copies the given memory into the raster.
Public methodCopyFromMemory(IntPtr, RasterAttributes)
Copies the given memory into the raster.
Public methodCopyFromRaster
Copies the data associated with the given Raster into this raster.
Public methodDispose
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExtractBand(RasterBand)
Extracts the band of raster data associated with the given RasterBand.
Public methodExtractBand(RasterFormat)
Extracts the bands of raster data associated with the given RasterFormat.
Protected methodFinalize (Overrides ObjectFinalize.)
Public methodFlip
Flips the raster along the given axis.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRotate
Rotates the raster by the given angle.
Public methodToBitmap
Copies the raster to a .NET Bitmap if the RasterFormat is supported. RGB, RGBA, BGR, and BGRA raster data is supported.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also