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 Scanline<T> GetScanline<T>( int scanline ) where T : struct, new() |
Visual Basic (Declaration) |
---|
Public Function GetScanline(Of T As {Structure, New}) ( _ scanline As Integer _ ) As Scanline(Of T) |
Visual C++ |
---|
public: generic<typename T> where T : value class, gcnew() Scanline<T>^ GetScanline( int scanline ) |
Parameters
- scanline
- Type: System..::.Int32
Number of the scanline to retrieve.
Type Parameters
- T
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 = bitmap.GetScanline<RGBQUAD>(0); foreach (RGBQUAD pixel in scanline) { Console.WriteLine(pixel); } }
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentException | The bitmap's type or color depth are not supported. |
System..::.ArgumentOutOfRangeException | scanline is no valid value. |