Skip to content

Margin 0 error code is output in png files. #195

@tuncaybahadir

Description

@tuncaybahadir

First of all, thank you for your near-perfect package.

The subject was opened before, but the subject was suspended because the friend who opened it moved to Mars.

The problem is, when margin is given as 0 when generating qr code in png format, the qr generated is incorrect. In the qr code, white dots are formed in black colors on the left edge. When creating a QR code, the location of the white dots changes according to the given text. Many devices cannot read the qr code due to white dots. When the margin is given at 1 and above, the error disappears.

I am sending details about the error below.

Tools Used;

php 8.4
bacon/bacon-qr-code 3.0

`

  new ImageRenderer(
        new RendererStyle(400, 0),
        new ImagickImageBackEnd()
    );

    $writer = new Writer($renderer);
    $writer->writeFile('Quar package create qr code', 'bacon.png');

`

Image

When we give a value of margin 1 or above, no problem occurs.

`

  new ImageRenderer(
        new RendererStyle(400, 1),
        new ImagickImageBackEnd()
    );

    $writer = new Writer($renderer);
    $writer->writeFile('Quar package create qr code', 'bacon.png');

`

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