We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Our Code World Comment Policy

Our Comments Section is open to every developer, so you can contribute (even code) to the main idea of the Article.

Please read our Comment Policy before commenting.
Join the discussion…

- ##### in this conversation

⬇ Drag and drop your images here to upload them.

- Attach

###### Log in with

###### or sign up with Disqus or pick a name

### Disqus is a discussion network

- Disqus never moderates or censors. The rules on this community are its own.
- Don't be a jerk or do anything illegal. Everything is easier that way.

Read full terms and conditions

I agree to Disqus' Terms of Service

I agree to Disqus' processing of email and IP address, and the use of cookies, to facilitate my authentication and posting of comments, explained further in the Privacy Policy

- sreng khorn • 2 years ago

  I have a problem with logo image PNG. After I generated completely logo image PNG has white background

  - View Hide
  see more
  - Carlos Delgado OCW Mod sreng khorn • 2 years ago

    Hey sreng khorn thanks for report this issue and sorry for the late reply as it took a little bit to figure out how to fix it. It is due to the transparency, however it removes part of the QR code, therefore we need to use the following lines in the snippet to fix it :

        // START TO DRAW THE IMAGE ON THE QR CODE
        $logo = imagecreatefromstring(file_get_contents($logopath));

        /**
         *  Fix for the transparent background
         */
        imagecolortransparent($logo , imagecolorallocatealpha($logo , 0, 0, 0, 127));
        imagealphablending($logo , false);
        imagesavealpha($logo , true);

    I just add how to solve this issue in the article. Thanks for commenting !

    see more
    - sreng khorn Carlos Delgado • 2 years ago

      Thank you very much!! Now it works. Good job!!

      see more
- intern ship • 14 days ago

  hello, may i know this code can make dynamic qr code ?

  see more
- Max Costa • 6 months ago

  someone knows how can i do this with ajax in wordpress?

  see more
- Ritish Ghosh • a year ago

  View Hide

  When I scan this qr code, it does not return anything but when I create a qrcode without logo, it does return the values. Can you help that where I am lacking.

  see more
  - Bayu Apriansah Ritish Ghosh • 3 months ago

    i think this barcode is fine, if i'm right, the value in this barcode is 09130948 (?)

    see more
    - Andri Pratama Bayu Apriansah • 3 months ago

      it's QR Code Not Barcode actualy

      see more
- Nuttapong Sarkana • 2 years ago

  i want setting width and height of QR code how to ?

  see more
- sreng khorn • 2 years ago

  Another problem is when I try with another logo beside Our Code World Logo, the previous error still occurred.

  - View Hide
  see more
  - zack sreng khorn • 2 years ago

    I had the same issue using any other png logo I was saving from photoshop after several tries. I tried multiple ways using alpha channel, making sure there was no other layers, even changing interlaced setting and color profile for "convert to sRGB" in the save for web settings. None of this worked. However, downloading and using you png logo worked fine. I also discovered that saving as a gif worked to preserve the transparency. All of this without using the additional lines for transparency "fix". In fact, adding that didnt help. It has something else to do with how transparent png are saved. I discovered this by taking my same png file and looking for a way to convert online to see if I could get it to work. Here was my answer: http://image.online-convert... I uploaded my current transparent png ... used this new one and it worked like a charm. I don't know what settings it uses, but it works. good luck

    see more
  - Carlos Delgado OCW Mod sreng khorn • 2 years ago

    Hi sreng khorn , that's weird because i've tried with other logos and it works. Does your image has png format and has transparency ? Could you send your logo image to dev@ourcodeworld.com so i can check it out ? Thanks for the comment !

    see more

Load more comments

## Also on Our Code World

- ### How to merge multiple PDFs in Laravel

  - 1 comment
  - 9 months ago

  Jimmy Walt — youtu。be/CuQArPdsRxgMerge Multiple PDF Files into a single PDF on Mac

- ### How to create a dependent select (dependent dropdown) in Symfony 3

  - 4 comments
  - 6 months ago

  ella — Is a similar article also for symfony 4?

- ### How to obfuscate JavaScript code with Node.js

  - 1 comment
  - 8 months ago

  ReynerAlternativo — 'unless you are a privileged genius'lies, people can easily read it

- ### How to configure a virtual host for a Laravel Project in Xampp for Windows

  - 2 comments
  - 9 months ago

  Rasik Kunwar — helllo i tried it but when i put my url then it open all file structure of my project and when i click public then it open my project but other route doesnot work