Class RGBLuminanceSource
- Namespace
- ZXing
- Assembly
- zxing.dll
Luminance source class which support different formats of images.
public class RGBLuminanceSource : BaseLuminanceSource
- Inheritance
-
RGBLuminanceSource
- Inherited Members
Constructors
RGBLuminanceSource(byte[], int, int)
Initializes a new instance of the RGBLuminanceSource class. It supports a byte array with 3 bytes per pixel (RGB24).
public RGBLuminanceSource(byte[] rgbRawBytes, int width, int height)
Parameters
RGBLuminanceSource(byte[], int, int, bool)
Initializes a new instance of the RGBLuminanceSource class. It supports a byte array with 1 byte per pixel (Gray8). That means the whole array consists of the luminance values (grayscale).
[Obsolete("Use RGBLuminanceSource(luminanceArray, width, height, BitmapFormat.Gray8)")]
public RGBLuminanceSource(byte[] luminanceArray, int width, int height, bool is8Bit)
Parameters
luminanceArray
byte[]The luminance array.
width
intThe width.
height
intThe height.
is8Bit
boolif set to
true
[is8 bit].
RGBLuminanceSource(byte[], int, int, BitmapFormat)
Initializes a new instance of the RGBLuminanceSource class. It supports a byte array with 3 bytes per pixel (RGB24).
public RGBLuminanceSource(byte[] rgbRawBytes, int width, int height, RGBLuminanceSource.BitmapFormat bitmapFormat)
Parameters
rgbRawBytes
byte[]The RGB raw bytes.
width
intThe width.
height
intThe height.
bitmapFormat
RGBLuminanceSource.BitmapFormatThe bitmap format.
RGBLuminanceSource(int, int)
Initializes a new instance of the RGBLuminanceSource class.
protected RGBLuminanceSource(int width, int height)
Parameters
Methods
CalculateLuminance(byte[], BitmapFormat)
calculates the luminance values for the given byte array and bitmap format
protected void CalculateLuminance(byte[] rgbRawBytes, RGBLuminanceSource.BitmapFormat bitmapFormat)
Parameters
rgbRawBytes
byte[]bitmapFormat
RGBLuminanceSource.BitmapFormat
CreateLuminanceSource(byte[], int, int)
Should create a new luminance source with the right class type. The method is used in methods crop and rotate.
protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height)