• Advertisement
Sign in to follow this  

HTML Canvas - drawing images in one colour

This topic is 1747 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sorry if this is not  the right forum, couldn't identify one to be html specific.

 

Simply put, how can I draw an image with transparency info, so that all non-transparent pixels are drawn using a given colour?

 

thanks

 

 r.

Share this post


Link to post
Share on other sites
Advertisement

I believe that link says its as easy as changing the canvas' context data, specifically the GlobalAlpha value.

 

e.g.

 

context.globalAlpha = 0.5f; // Half transparency

 

Am I missing something?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement