I need blend image data. I do not know how to explain it, so I show it.
I cant write links because my reputation is minimal, so here is directory with images online.
I have destination image as in link above.
FirstStep.png I draw to black image with alpha 0.5. result image is Source image
when I draw Source image to destination image result is as sourceimage on destination
I need blend mode for result like final.png
This Im made one nameless game engine. I need do this same on html canvas. on nameless game engine I do it with this
draw_set_blend_mode_ext(bm_dest_color,bm_normal);
'destination image'.draw('Source image')//some like this
in documentation from nameless game engine is written this
draw_set_blend_mode_ext(src,dest) Indicates what blend mode to use for both the source and destination color. The new color is some factor times the source and another factor times the destination. These factors are set with this function. To understand this, the source and destination both have a red, green, blue, and alpha component. So the source is (Rs, Gs, Bs, As) and the destination is (Rd, Gd, Bd, Ad). All are considered to lie between 0 and 1. The blend factors you can choose for source and destination are:
- bm_zero: Blend factor is (0, 0, 0, 0).
- bm_dest_color: Blend factor is (Rd, Gd, Bd, Ad).
can somebody help me make some like draw_set_blend_mode_ext(bm_dest_color,bm_normal);
for JavaScript?