2 using System.Collections.Generic;
4 using System.Runtime.InteropServices;
12 public sealed
class Scanline<
T> : MemoryArray<T> where
T : struct
29 : this(dib, scanline, (int)(typeof(T) == typeof(
FI1BIT) ?
30 FreeImage.GetBPP(dib) * FreeImage.GetWidth(dib) :
31 typeof(T) == typeof(
FI4BIT) ?
32 FreeImage.GetBPP(dib) * FreeImage.GetWidth(dib) / 4 :
33 (FreeImage.GetBPP(dib) * FreeImage.GetWidth(dib)) / (Marshal.SizeOf(typeof(T)) * 8)))
37 internal Scanline(
FIBITMAP dib,
int scanline,
int length)
38 : base(FreeImage.GetScanLine(dib, scanline), length)
42 throw new ArgumentNullException(
"dib");
44 if ((scanline < 0) || (scanline >= FreeImage.GetHeight(dib)))
46 throw new ArgumentOutOfRangeException(
"scanline");
The FIBITMAP structure is a handle to a FreeImage bimtap.
Scanline(FIBITMAP dib, int scanline)
Initializes a new instance based on the specified FreeImage bitmap.
The FI1BIT structure represents a single bit. It's value can be 0 or 1.
bool IsNull
Gets whether the handle is a null or not.
Scanline(FIBITMAP dib)
Initializes a new instance based on the specified FreeImage bitmap.
The FI4BIT structure represents the half of a Byte. It's valuerange is between 0 and 15...