Table of Contents

Class BitmapLuminanceSource

Namespace
ZXing
Assembly
zxing.dll

class which represents the luminance values for a bitmap object

public class BitmapLuminanceSource : BaseLuminanceSource
Inheritance
BitmapLuminanceSource
Inherited Members

Constructors

BitmapLuminanceSource(Bitmap)

Initializes a new instance of the BitmapLuminanceSource class with the image of a Bitmap instance

public BitmapLuminanceSource(Bitmap bitmap)

Parameters

bitmap Bitmap

The bitmap.

BitmapLuminanceSource(int, int)

Initializes a new instance of the BitmapLuminanceSource class.

protected BitmapLuminanceSource(int width, int height)

Parameters

width int

The width.

height int

The height.

Methods

CalculateLuminanceValues(Bitmap, byte[])

calculates the luminance values for bitmaps

protected static void CalculateLuminanceValues(Bitmap bitmap, byte[] luminances)

Parameters

bitmap Bitmap
luminances byte[]

CalculateLuminanceValuesForIndexed1Bit(Bitmap, BitmapData, byte[])

calculates the luminance values for 1-bit indexed bitmaps

protected static void CalculateLuminanceValuesForIndexed1Bit(Bitmap bitmap, BitmapData data, byte[] luminances)

Parameters

bitmap Bitmap
data BitmapData
luminances byte[]

CalculateLuminanceValuesForIndexed4Bit(Bitmap, BitmapData, byte[])

calculates the luminance values for 4-bit indexed bitmaps

protected static void CalculateLuminanceValuesForIndexed4Bit(Bitmap bitmap, BitmapData data, byte[] luminances)

Parameters

bitmap Bitmap
data BitmapData
luminances byte[]

CalculateLuminanceValuesForIndexed8Bit(Bitmap, BitmapData, byte[])

calculates the luminance values for 8-bit indexed bitmaps

protected static void CalculateLuminanceValuesForIndexed8Bit(Bitmap bitmap, BitmapData data, byte[] luminances)

Parameters

bitmap Bitmap
data BitmapData
luminances byte[]

CalculateLuminanceValuesSlow(Bitmap, byte[])

old slow way for unsupported bit depth

protected static void CalculateLuminanceValuesSlow(Bitmap bitmap, byte[] luminances)

Parameters

bitmap Bitmap
luminances byte[]

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)

Parameters

newLuminances byte[]

The new luminances.

width int

The width.

height int

The height.

Returns

LuminanceSource