FreeImageBitmap.GetScanline(T) Method (Int32)

FreeImage.NET

FreeImageBitmapGetScanlineT Method (Int32)
Returns an instance of ScanlineT, 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) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public Scanline<T> GetScanline<T>(
	int scanline
)
where T : struct, new()

Parameters

scanline
Type: SystemInt32
Number of the scanline to retrieve.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:FreeImageAPI.FreeImageBitmap.GetScanline``1(System.Int32)"]

Return Value

Type: ScanlineT
An instance of ScanlineT representing the scanlineth scanline.
Exceptions
ExceptionCondition
ArgumentException The bitmap's type or color depth are not supported.
ArgumentOutOfRangeExceptionscanline is no valid value.
Remarks
Examples
FreeImageBitmap bitmap = new FreeImageBitmap(@"C:\Pictures\picture.bmp");
if (bitmap.ColorDepth == 32)
{
    Scanline<RGBQUAD> scanline = bitmap.GetScanline<RGBQUAD>(0);
    foreach (RGBQUAD pixel in scanline)
    {
        Console.WriteLine(pixel);
    }
}
See Also