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

How to insert a image into a image #855

Open
spelsinx opened this issue Mar 19, 2023 · 2 comments
Open

How to insert a image into a image #855

spelsinx opened this issue Mar 19, 2023 · 2 comments

Comments

@spelsinx
Copy link

How to paste an image on an image and scale it like a canvas?

drawImage("image.png", 350, 450)
@yellowjacketcoder
Copy link

yellowjacketcoder commented May 12, 2023

@spelsinx You need to create your own string and then pass it into draw like so:

.draw('image over x,y width,height "image.png"')

But yeah, a helper method would be nice, bonus points for adding support for directly passing the sub-image as a buffer/stream like it is supported for the base image, eliminating the need for storing sub-images to a temp directory at all

@spelsinx spelsinx reopened this May 29, 2023
@spelsinx
Copy link
Author

hello i used this text, it is in place, everything is fine

.drawText(440, 270, "spelsinx", 'southeast')

and this - leads the text forward, but I want it to be in place and not move.

.drawText(440, 270, "prop", 'southeast')

how to make the text not move, but stand still, as in the case of "spelsinx"?

@spelsinx You need to create your own string and then pass it into draw like so:

.draw('image over x,y width,height "image.png"')

But yeah, a helper method would be nice, bonus points for adding support for directly passing the sub-image as a buffer/stream like it is supported for the base image, eliminating the need for storing sub-images to a temp directory at all

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

No branches or pull requests

2 participants