Closed marcosfreitas closed 5 months ago
I could fix this by multiplying the alpha value by 100 before generating the qr code. It only happened in PHP 8.
That sounds a lot like a bug in a specific version of the IMagick
library. Best to report the bug there. What we are passing in for RGB is the following:
rgba(%d, %d, %d, %F)
: https://github.com/Bacon/BaconQrCode/blob/master/src/Renderer/Image/ImagickImageBackEnd.php#L307
With the alpha value being set between 0 and 1, as documented.
Actually, you are supposed to pass in the alpha value as 0-100, not 0-1 :)
php 8 with imagick.
I have these parameters and If I use the alpha, the generated qr code remains blank, ignoring the colors. Any suggestion?
foreground color:
background-color:
base64 result:
iVBORw0KGgoAAAANSUhEUgAAAcIAAAHCAgMAAAABdiHWAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAJUExURYCHNQD/W////5BFhoQAAAACdFJOUwUDku1oxwAAAAFiS0dEAmYLfGQAAAJQSURBVHja7dxLrusgDADQdBHZVybsfytPb3A/bR1syEdX6mFURYEDncRgJ8vSb4/2u31fSX4caUQikUgkEv+MmAw7IT4vpLKi/21L/od4QCKRSCQSiV2x+ugfunmPyAYZWj6RSCQSicSLxF7fuV4HxPUr4FnD5ROJRCKRSLxXPD/OeV5INfIhEolEIpF4wa786Yl/OBeQTDsTz8+wEIlEIpH4aWKlJnCobvCiKsT76x6JRCKRSCQOTabbWrE9hzdrm20bkUgkEonEZJyx7f/yNoet+qMudroQiUQikUi8TRyKAfbmmdQzbNVDjxaKjyDfQSQSiUQisSNekvSPeh0Uh+oSf05XiEQikUgkLtGXhW4WOycbLalgXPev9PIdRCKRSCQSy2IcLRxIE7zUBHbGT64MZkmIRCKRSCQmZQCVwoDzxDRPEcYw89MjEolEIpFYE+OT/464VKOC3vFC9h2k6oSj7AORSCQSicREHA9IKsUDQQzQ4grGNTwPeV/sI0tzEIlEIpFIrIjbSJnfbD1AJ5g5U3wZkEgkEolE4kFxvL0M2Aqtk8uIDzTa/hUikUgkEomVY/z69v+i7xWXF0IkEolEIvFWcTkjXzCUwnhPhQxVS25EIpFIJBJ74tyjPw4GdnIBk2JLrhCJRCKRSLxajEerxADbklQXVE4tsjcm4nuIRCKRSCSeK85VEQyKbb9AsbJYIpFIJBKJR8Xyrr8eJFTKHdf+2wrZycNazrAQiUQikfiJYmVHP9H3QHjQyVysbfeDCWOvPBCJRCKR+NHiP9uNgCxWxGyIAAAAAElFTkSuQmCC
rendered: