Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: allow URL as Logo path #118

Open
287541828 opened this issue Jul 7, 2017 · 6 comments
Open

Feature request: allow URL as Logo path #118

287541828 opened this issue Jul 7, 2017 · 6 comments
Assignees

Comments

@287541828
Copy link

@287541828 287541828 commented Jul 7, 2017

$qrCode->setLogo('http://www.xxx.com/xxx.png') ??? How can I use this?


    public function setLogo($logo)
    {
        if (!file_exists($logo)) {    // **How do I change it?**
            throw new DataDoesntExistsException("$logo file does not exist");
        }

        $this->logo = $logo;

        return $this;
    }
@endroid
Copy link
Owner

@endroid endroid commented Jul 7, 2017

Hi, the file_exists method only checks local resources. You can use curl to check existence of remote resources.

Please note that not all output formats include the logo yet. I know the PNG writer does.

@endroid endroid closed this Jul 7, 2017
@endroid endroid self-assigned this Jul 7, 2017
@endroid endroid added the question label Jul 7, 2017
@287541828
Copy link
Author

@287541828 287541828 commented Jul 7, 2017

Thank you very much~ Would you like to add such a feature later?

@endroid
Copy link
Owner

@endroid endroid commented Jul 8, 2017

Yes I think that would be a useful improvement. I reopened the issue and assigned the corresponding labels. Anyone can contribute but when I have time I will implement this myself.

@endroid endroid reopened this Jul 8, 2017
@endroid endroid changed the title How to use web link image to make a logo? Feature request: allow URL as Logo path Jul 8, 2017
@huichen2017
Copy link

@huichen2017 huichen2017 commented Jan 11, 2019

Can you add this function earlier?

@endroid
Copy link
Owner

@endroid endroid commented Jan 14, 2019

@huichen2017 Not any time soon I'm afraid, sorry!

@huichen2017
Copy link

@huichen2017 huichen2017 commented Jan 15, 2019

Nothing, I now compress the remote image and save it locally, then I can set the logo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.