I'm looking for any solution to get QR Code with soft edge programmatically.
Any solution could be right. Post processing after QR Code generation or built in feature of any library.
In PHP you can use GD library to perform some filtering on qrcode image, like smoothing and median (easy to implement) http://php.net/manual/en/function.imagefilter.php
This is what you need.. assuming $img
is image of qrcode.
$i=10;
while($i--)
imagefilter($img,IMG_FILTER_GAUSSIAN_BLUR);
imagefilter($img,IMG_FILTER_CONTRAST,-100);
After that use
header("Content-type: image/jpeg");
imagejpeg($img,null,100);
to send image to output.
There is one more thing - number of iteration of gaussian blur should depend on qr code point size. Maybe you can check in loop the darkest value, if it's not 0 then stop blurring.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With