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:
FreeImageAPIAssembly: 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
List of return-types of T:
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
Exception | Condition |
---|---|
System..::.ArgumentException | The type of the bitmap or color depth are not supported. |
System..::.ArgumentOutOfRangeException | scanline is no valid value. |