simple-qrcode icon indicating copy to clipboard operation
simple-qrcode copied to clipboard

Black and white problem merging logos

Open nouman1105 opened this issue 3 years ago • 9 comments

Hi there ! The problem is that if I merge a colored logo in qrcode its color background effects the logo's origional color... Please guide me if there is any solution for this... the merged logo type in png....

qr-code (16) qr-code (13) qr-code (12)

nouman1105 avatar Mar 31 '21 13:03 nouman1105

Please provide the full code sample and images you used

SimplyCorey avatar Apr 04 '21 13:04 SimplyCorey

[Project deleted] Sorry for getting late, because i was busy doing some work and this app is nested with too many things, so the best way was to make a mini project to demonstrate the application, I just got time and made a mini app for you....

because i work on windows and xampp the steps are following:

  1. unzip file to htdocs.
  2. create a new database in phpmyadmin with name "qrcode_app".
  3. run php artisan migrate
  4. the app will be on homepage

the php for app is in the following files:

  1. QrcodeController
  2. QrcodeApp(App/Repositories/Qrcode/QrcodeApp.php)
  3. LogosController (for logo uploads)
  4. customize-qr-code.blade.php(/views)
  5. qrcode_image(just for rendering the image after ajax call)
  6. qr_scripts.blade.php(/view) (the jquery i used for the app)

nouman1105 avatar Apr 27 '21 17:04 nouman1105

3. Make brand logos.zip

Here are pictures i am using as logos... kindly guide me , so i can solve this issue. Thanks

nouman1105 avatar Apr 27 '21 18:04 nouman1105

if you face any issues regarding the code please leave a message, and also if you want me to make a manual to use the app kindly leave a message Thanks

nouman1105 avatar Apr 27 '21 18:04 nouman1105

Hi there! Hope that you are fine. Could you manage some time to have a look on my issue ?

nouman1105 avatar May 08 '21 20:05 nouman1105

Remove this function backgroundColor when generating code. I can't give you more details about that function but it works on my end when I removed it.

Let me know if this works in your end.

deven-lopen avatar Nov 17 '21 08:11 deven-lopen

I am having the same issue. Can you please post your ans?

rupalgohel avatar Feb 16 '22 10:02 rupalgohel

I'll accept a PR for this.

SimplyCorey avatar Feb 16 '22 20:02 SimplyCorey

I have the same issue, I have used the merge function to add the logo in the QR But I want the QR to be png with transparent background

The issue is the logo and QR has been changed color and it didn't work as transparent background Here is my code:

QrCode::format('png')->size(1500)->color(52, 49, 52)->backgroundColor(0, 0, 0, 0)
            ->merge(public_path("img/logo.png"), .5, true)->errorCorrection('H')
            ->generate('https://www.example.com', public_path("uploads/result.png"));

And here is the result: re_trans (1)

abdulkareem-f avatar Feb 19 '22 15:02 abdulkareem-f