IPixelBlock Interface

Provides access to members that control a PixelBlock.

Members

Name Description
Read-only property BytesPerPixel The number of bytes per pixel for the PixelBlock.
Method GetVal The value for a specified pixel.
Read-only property Height The height of the PixelBlock in pixels.
Read/write property PixelType The pixel type of the PixelBlock.
Read-only property Planes The number of pixel arrays contained in the PixelBlock.
Read/write property SafeArray A variant SafeArray of pixels for a specified plane.
Read-only property Width The width of the PixelBlock in pixels.

IPixelBlock.BytesPerPixel Property

The number of bytes per pixel for the PixelBlock.

Public ReadOnly Property BytesPerPixel As Integer
public int BytesPerPixel {get;}

IPixelBlock.GetVal Method

The value for a specified pixel.

Public Function GetVal ( _
    ByVal plane As Integer, _
    ByVal X As Integer, _
    ByVal Y As Integer _
) As Object
public object GetVal (
    int plane,
    int X,
    int Y
);

IPixelBlock.Height Property

The height of the PixelBlock in pixels.

Public ReadOnly Property Height As Integer
public int Height {get;}

IPixelBlock.PixelType Property

The pixel type of the PixelBlock.

Public Function get_PixelType ( _
    ByVal plane As Integer _
) As rstPixelType
Public Sub set_PixelType ( _
    ByVal plane As Integer, _
    ByVal val As rstPixelType _
)
public rstPixelType get_PixelType (
    int plane
);
public void set_PixelType (
    int plane,
    rstPixelType val
);

IPixelBlock.Planes Property

The number of pixel arrays contained in the PixelBlock.

Public ReadOnly Property Planes As Integer
public int Planes {get;}

IPixelBlock.SafeArray Property

A variant SafeArray of pixels for a specified plane.

Public Function get_SafeArray ( _
    ByVal plane As Integer _
) As Object
Public Sub set_SafeArray ( _
    ByVal plane As Integer, _
    ByVal val As Object _
)
public object get_SafeArray (
    int plane
);
public void set_SafeArray (
    int plane,
    object val
);

IPixelBlock.Width Property

The width of the PixelBlock in pixels.

Public ReadOnly Property Width As Integer
public int Width {get;}

Classes that implement IPixelBlock

Classes Description
PixelBlock (esriDataSourcesRaster) Esri PixelBlock, a container of pixel data.

Remarks

The Height and Width properties return the number of rows and columns in the PixelBlock.

The Planes argument returns the number of bands in the PixelBlock.

The PixelType property specifies the data type and bit depth of the pixels in the specified band.The SafeArray property specifies the variant SafeArray for the specified band. At ArcGIS 9.0 and later, this property returns SafeArray by value, not by reference like it does in ArcGIS 8.x. Your application, if only reads pixel values from SafeArray, will not be affected by this change. However, if your application involves modifying and writing pixel block to the band, you might experience a different behavior. The recommended fix is to use IPixelBlock3::PixelDataByRef method.

The GetVal method returns an individual value for the pixel specified by the band and pixel location input.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.