Skip to content

Kirby 5.0.4

$qrCode->toImage()

Returns the QR code as a GdImage object

$qrCode->toImage(int|null $size = null, string $color = '#000000', string $back = '#ffffff', int $border = 4): GdImage

Parameters

Name Type Default Description
$size intornull null Image width/height in pixels, defaults to a size per module of 4x4
$color string '#000000' Foreground color in hex format
$back string '#ffffff' Background color in hex format
$border int 4 Border size in number of modules

Return type

GdImage

This method modifies the existing $qrcode object it is applied to and returns it again.

Parent class

Kirby\Image\QrCode