Skip to content

Kirby 4.2.0

$qrcode->toImage()

Returns the QR code as a GdImage object

$qrcode->toImage(?int $size = null, string $color = '#000000', string $back = '#ffffff'): GdImage

Parameters

Name Type Default Description
$size int|null 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

Return type

GdImage

Parent class

Kirby\Image\QrCode