-
Notifications
You must be signed in to change notification settings - Fork 11
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
Can the loading method directly support the loading of image content? #28
Comments
Did you try |
Or do you want to load an image resource? |
Yes, I want to load an image resource directly.Because the QRcode image has been generated in memory,I want to synthesize it to other image. |
Well, due the library doesn't support image resource loading, we can add it as new feature. |
Did you try to use $qr = new Image();
$qr->load('/img.png')
$qr->scale(0.5)
// preserve the image resource because save function destroy it by default
$qr->preserve()
$qr->save('/new_qr.png')
$img2 = new Image();
$img2->load('/img2.png')
$img2->scale(0.1)
$img2->save('/new_img2.png')
// use canvas to merge them as a new image
$canvas = new Canvas();
$canvas->append([
$qr,
$img2,
]);
$canvas->draw();
// Canvas extends from Image, so you can use all image methods too.
$canvas->save(); Tell me later how it was. |
|
Yes,I used Canvas. |
I used "simplesoftwareio/simple-qrcode" to generate QrCode image resource,and I want to load image resource like this:
|
But I don't know how to add to the library is better. |
Yeah, that's the idea. I have created an issue #29 to do that. |
Oh, that's great! |
Done aa286bd |
The new release v3.0.5 have published. Check out #29 |
I got it, thank you! |
For example, after generating the QRCode image, I want to create ImageObject directly with the
QRCode image content. Otherwise, I can only save it locally and then read the local file, wasting IO
The text was updated successfully, but these errors were encountered: