Returns an instance of Scanline<(Of <(T>)>), representing the scanline specified by scanline of this FreeImageBitmap. Since FreeImage bitmaps are always bottum up aligned, keep in mind that scanline 0 is the bottom-most line of the image.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public Object GetScanline(
	int scanline
)
Visual Basic (Declaration)
Public Function GetScanline ( _
	scanline As Integer _
) As Object
Visual C++
public:
Object^ GetScanline(
	int scanline
)

Parameters

scanline
Type: System..::.Int32
Number of the scanline to retrieve.

Return Value

An instance of Scanline<(Of <(T>)>) representing the scanlineth scanline.

Remarks

Examples

CopyC#
FreeImageBitmap bitmap = new FreeImageBitmap(@"C:\Pictures\picture.bmp");
if (bitmap.ColorDepth == 32)
{
    Scanline<RGBQUAD> scanline = (Scanline<RGBQUAD>)bitmap.GetScanline(0);
    foreach (RGBQUAD pixel in scanline)
    {
        Console.WriteLine(pixel);
    }
}

Exceptions

ExceptionCondition
System..::.ArgumentException The type of the bitmap or color depth are not supported.
System..::.ArgumentOutOfRangeException scanline is no valid value.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also