You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
By doing this, the resulting color will be:
R = B * (1 - a) + T * a
where B = bottom color, T = top color. The bottom was white because we cleared the bitmap (B = 1), whereas the top was made black using the brightness command (T = 0), so you get
R = 1 - a
Which makes it pretty easy to work out.
load image "LED Green.png", 1
`Make all color components black
ik set image brightness 1, 0.0, 0.0, 0.0
`Create a render target (or bitmap)
ik create render target 2, image width(1), image height(1), rgb(255, 255, 255)
`Paste image 1 on image 2
ik paste image on image 1, 2, 0, 0
`And there you have it
paste image 2, 0, 0
Login to post a reply