How do I give my transparent images color?
in
Programming Questions
•
2 years ago
Atm I have these two images
blackBackground.JPG:
and rightStanceBoxer.png:
and this is the code:
PImage rightStanceBoxer = loadImage("blackBackground.JPG").get(0,0,201,200);
rightStanceBoxer.mask(loadImage("rightStanceBoxer.png"));
this gives me a black stickman image with a transparent background so you can see the background behind him. here's a screenshot:
then I use image() and specify where on the screen I want the image to go..
I want to add color to this image but I have no idea how. I tried to use the tint() function right before image() is called but that did not do anything. I tried looking at the api and other online sources but I am still confused.. can anyone give me some tips?
1