\Endroid\QrCode\WriterPngWriter

Summary

Methods
Properties
Constants
writeDataUri()
writeFile()
supportsExtension()
getSupportedExtensions()
getName()
writeString()
getContentType()
No public properties found
No constants found
convertColor()
convertErrorCorrectionLevel()
addMargin()
calculateAdditionalWhiteSpace()
addLogo()
addLabel()
imageToString()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

writeDataUri()

writeDataUri(\Endroid\QrCode\QrCodeInterface  $qrCode) : string

Parameters

\Endroid\QrCode\QrCodeInterface $qrCode

Returns

string —

writeFile()

writeFile(\Endroid\QrCode\QrCodeInterface  $qrCode, mixed  $path) : mixed

Parameters

\Endroid\QrCode\QrCodeInterface $qrCode
mixed $path

Returns

mixed —

supportsExtension()

supportsExtension(mixed  $extension) : bool

Parameters

mixed $extension

Returns

bool —

getSupportedExtensions()

getSupportedExtensions() : mixed

{@inheritdoc}

Returns

mixed —

getName()

getName() : string

Returns

string —

writeString()

writeString(\Endroid\QrCode\QrCodeInterface  $qrCode) : mixed

{@inheritdoc}

Parameters

\Endroid\QrCode\QrCodeInterface $qrCode

Returns

mixed —

getContentType()

getContentType() : mixed

{@inheritdoc}

Returns

mixed —

convertColor()

convertColor(array  $color) : \BaconQrCode\Renderer\Color\Rgb

Parameters

array $color

Returns

\BaconQrCode\Renderer\Color\Rgb —

convertErrorCorrectionLevel()

convertErrorCorrectionLevel(string  $errorCorrectionLevel) : string

Parameters

string $errorCorrectionLevel

Returns

string —

addMargin()

addMargin(resource  $sourceImage, int  $margin, int  $size, int[]  $foregroundColor, int[]  $backgroundColor) : resource

Parameters

resource $sourceImage
int $margin
int $size
int[] $foregroundColor
int[] $backgroundColor

Returns

resource —

calculateAdditionalWhiteSpace()

calculateAdditionalWhiteSpace(resource  $image, int[]  $foregroundColor) : int

Parameters

resource $image
int[] $foregroundColor

Returns

int —

addLogo()

addLogo(resource  $sourceImage, string  $logoPath, int  $logoWidth = null) : resource

Parameters

resource $sourceImage
string $logoPath
int $logoWidth

Returns

resource —

addLabel()

addLabel(resource  $sourceImage, string  $label, string  $labelFontPath, int  $labelFontSize, string  $labelAlignment, int[]  $labelMargin, int[]  $foregroundColor, int[]  $backgroundColor) : resource

Parameters

resource $sourceImage
string $label
string $labelFontPath
int $labelFontSize
string $labelAlignment
int[] $labelMargin
int[] $foregroundColor
int[] $backgroundColor

Throws

\Endroid\QrCode\Exception\MissingFunctionException

Returns

resource —

imageToString()

imageToString(resource  $image) : string

Parameters

resource $image

Returns

string —