How to programmatically change image borders using PHP?

I am looking for any solution to make the program code QR Code with a soft edge.

Any decision may be right. Subsequent processing after generating a QR code or built-in function of any library.

+5
source share
2 answers

In PHP, you can use the GD library to perform some filtering on the qrcode image, for example, anti-aliasing and median (easy to implement) http://php.net/manual/en/function.imagefilter.php

This is what you need. Assuming that $imgis a qrcode image.

$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 the image to output.

Smooth qr code

: qr. , , 0, .

+8
0

All Articles