Documentation

LuminanceSourceInterface

Interface for the luminance sources

Table of Contents

Methods

fromBlob()  : static
Creates a LuminanceSource instance from the given data blob
fromFile()  : static
Creates a LuminanceSource instance from the given file
getRow()  : array<string|int, int>
Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have to bitwise and with 0xff for each value. It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getLuminances() may never be called.

Methods

fromBlob()

Creates a LuminanceSource instance from the given data blob

public static fromBlob(string $blob[, SettingsContainerInterface|QROptions $options = new QROptions() ]) : static
Parameters
$blob : string
$options : SettingsContainerInterface|QROptions = new QROptions()
Return values
static

fromFile()

Creates a LuminanceSource instance from the given file

public static fromFile(string $path[, SettingsContainerInterface|QROptions $options = new QROptions() ]) : static
Parameters
$path : string
$options : SettingsContainerInterface|QROptions = new QROptions()
Return values
static

getRow()

Fetches one row of luminance data from the underlying platform's bitmap. Values range from 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have to bitwise and with 0xff for each value. It is preferable for implementations of this method to only fetch this row rather than the whole image, since no 2D Readers may be installed and getLuminances() may never be called.

public getRow(int $y) : array<string|int, int>
Parameters
$y : int

The row to fetch, which must be in [0,getHeight())

Tags
throws
QRCodeDecoderException
Return values
array<string|int, int>

An array containing the luminance data.


        
On this page

Search results