Imporve quality of PNG ??
Diamond7 opened this issue · 4 comments
Diamond7 commented
I need to improve quality definition of PNG barcode, how to achieve it ?
lfelizari commented
Changing width and height will produce a big image with more resolution.
If you are trying to create a qr code, putting less data in "code" will make easy to read.
Diamond7 commented
What about change resolution but no make a bigger image, becasue that´s the
problem, the reader did not read the code,I suppose it is because there is
no a well defined image. To improve definition, invariabletly will make the
image bigger in size ?
…On Fri, 22 May 2020 at 08:59, Leandro Felizari ***@***.***> wrote:
Changing width and height will produce a big image with more resolution.
If you are trying to create a qr code, putting less data in "code" will
make easy to read.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZI7VMIPFVWOI6KA2LGCCTRSZSIXANCNFSM4MTF5D7A>
.
--
Dario Columbich
dario@tsftprogramacion.com
Skype: dario.columbich
WS +54 3462 15588759
lfelizari commented
The resolution must be decided by the size and application you are trying to achieve. If you are printing on paper or screen, make it large enough not to be resized upwards.
I tried a few things to make the barcode / QR code easier to read.
- White backgroud with black barcode.
- A 5mm margin of anything around
- Use good reading software. Typically, the feature in Google Lens reads very good on Android phones,
- Put less data.
Hope, it helps!
nicolaasuni commented
From the getBarcodeObj() documentation:
* @param int $width Barcode width in user units (excluding padding).
* A negative value indicates the multiplication factor for each column.
* @param int $height Barcode height in user units (excluding padding).
* A negative value indicates the multiplication factor for each row.
So you can set these values explicitly or as multiplication factor to get the desired resolution.