html5 - beginner questions about canvas elements with imported images... caching and changing colors -
couple noob questions canvas element in html. first, images imported canvas element cached? across browsers?
and second can import black , white png canvas element , change black color different color?
there nothing in canvas spec saying images must cached.
with canvas, need image html element already. way can interact canvas call .drawimage() on canvas' context.
there's no caching or saving after event. canvas prints pixels of image onto , forgets ever happened. no history, no caching.
you can draw (no importing) black-and-transparent png onto canvas, , change black color different color.
you change canvas context's globalcompositeoperation 'source-atop' , fill image space color of choice.
you same if black-and-white instead of black-and-transparent, take more work.
Comments
Post a Comment