\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

supportsExtension()

supportsExtension(string  $extension) : boolean

Parameters

string $extension

Returns

boolean

getSupportedExtensions()

getSupportedExtensions() 

{@inheritdoc}

getName()

getName() : string

Returns

string

getContentType()

getContentType() 

{@inheritdoc}

convertErrorCorrectionLevel()

convertErrorCorrectionLevel(string  $errorCorrectionLevel) : string

Parameters

string $errorCorrectionLevel

Returns

string

addMargin()

addMargin(resource  $sourceImage, integer  $margin, integer  $size, array<mixed,integer>  $foregroundColor, array<mixed,integer>  $backgroundColor) : resource

Parameters

resource $sourceImage
integer $margin
integer $size
array<mixed,integer> $foregroundColor
array<mixed,integer> $backgroundColor

Returns

resource

calculateAdditionalWhiteSpace()

calculateAdditionalWhiteSpace(resource  $image, array<mixed,integer>  $foregroundColor) : integer

Parameters

resource $image
array<mixed,integer> $foregroundColor

Returns

integer

addLogo()

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

Parameters

resource $sourceImage
string $logoPath
integer $logoWidth

Returns

resource

addLabel()

addLabel(resource  $sourceImage, string  $label, string  $labelFontPath, integer  $labelFontSize, string  $labelAlignment, array<mixed,integer>  $labelMargin, array<mixed,integer>  $foregroundColor, array<mixed,integer>  $backgroundColor) : resource

Parameters

resource $sourceImage
string $label
string $labelFontPath
integer $labelFontSize
string $labelAlignment
array<mixed,integer> $labelMargin
array<mixed,integer> $foregroundColor
array<mixed,integer> $backgroundColor

Throws

\Endroid\QrCode\Exception\MissingFunctionException

Returns

resource

imageToString()

imageToString(resource  $image) : string

Parameters

resource $image

Returns

string