FreeImage.NET Class Library Reference
FreeImageBitmapGetScanline 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 Object GetScanline( int scanline )
Parameters
- scanline
- Type: SystemInt32
Number of the scanline to retrieve.
Return Value
Type: ObjectAn instance of ScanlineT representing the scanlineth scanline.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The type of the bitmap or color depth are not supported. |
ArgumentOutOfRangeException | scanline is no valid value. |
Remarks
List of return-types of T:
Examples
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); } }
See Also