Skip to content

Gradient + Margin issue #211

@restyler

Description

@restyler

When I attach gradient to the qrcode, the margin trims eyes incorrectly. Images with issue and the code is attached.
simple-qrcode v.4.1.0
php 7.4.13
imagick module 3.4.4

With svg, everything works properly.

<?php
ini_set('display_errors', 1);

require_once '../vendor/autoload.php';
use SimpleSoftwareIO\QrCode\Generator;

$qrcode = new Generator;

$format = $_GET['format'] ?? 'svg';
$qrcode->format($format);
$qrcode->margin(2);
$qrcode->gradient(100,100,55,100,100,255,'horizontal');

if ($format == 'png') {
    header('Content-Type: image/png');
}

echo $qrcode->size(600)->generate('https://test.net/very-long-url');

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions