Sorry your browser is not supported!

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.

Code Snippets / Add alpha mask to image

Author
Message
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 19th Nov 2004 17:06
Here is a function to add an alpha layer mask to a loaded image.
Although you can't save an image with an alpha layer, is is useful for applying the same mask to multiple images.

I used it to add rounded edges to all the images i was using as playing cards. It meant that I could just create plain rectangular images for the cards, rather than having to save each one with an alpha layer mask.



Attached is a zip file containing the test images to use with this example.


Cheers,

Cloggy

Login to post a reply

Server time is: 2025-08-09 01:36:19
Your offset time is: 2025-08-09 01:36:19