ImageGear .NET v25.1 - Updated
GetRaster Method




ImageGear.Core Assembly > ImageGear.Core Namespace > ImGearDIB Class : GetRaster Method
Number of requested row.
Returns reference to raw raster store. Should be used to gain direct access to raster pixels.
Syntax
'Declaration
 
Public MustOverride Function GetRaster( _
   ByVal row As Integer _
) As ImGearArrayRef
'Usage
 
Dim instance As ImGearDIB
Dim row As Integer
Dim value As ImGearArrayRef
 
value = instance.GetRaster(row)
public abstract ImGearArrayRef GetRaster( 
   int row
)
public: abstract ImGearArrayRef GetRaster( 
   int row
) 
public:
abstract ImGearArrayRef GetRaster( 
   int row
) 

Parameters

row
Number of requested row.

Return Value

ImGearArrayRef structure instance that refers to the raster raw store.
Remarks
May be used to obtain direct access to the pixels in the raster.

In ImageGear for .NET, all rasters are kept and indexed in the normal form: the first raster is the top raster, the last raster is the bottom raster. This differs from BMP and older ImageGear versions, where rasters are stored in reverse mode: from bottom to top.

Rasters in ImageGear for .NET pixel storage are DWORD-aligned.

Raster size for standard DIBs (not run-ends) in ImageGear for .NET can be calculated using the following formula:

((Width * BitsPerChannel * ChannelCount + 31) & ~31) / BitsPerChannel

The +31 and & ~31 indicate DWORD alignment. The raster size is in terms of channel values. To calculate the raster size in terms of bytes, divide by 8 instead of BitsPerChannel.

See Also

Reference

ImGearDIB Class
ImGearDIB Members
ImGearArrayRef Structure