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

Adding background to merged image #89

Open
JRadl opened this issue May 1, 2020 · 2 comments
Open

Adding background to merged image #89

JRadl opened this issue May 1, 2020 · 2 comments

Comments

@JRadl
Copy link

JRadl commented May 1, 2020

I need to merge several transparent images and then add a color background based on user selected hex code. Is it possible to do that somehow?

@lukechilds
Copy link
Owner

It's not currently possible but support for that could be implemented.

If you add this functionality in clean and well documented way I'd happily accept a pull request.

Alternatively, if you don't want to implement it yourself you could sponsor me to implement it. I could do this for $50.

@xanpj
Copy link

xanpj commented Oct 4, 2020

var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
...
ctx.fillStyle = "white";
ctx.fillRect(0, 0, canvas.width, canvas.height);

Just add the last two lines to fill the background in the index.js

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

3 participants