Is it possible to apply a mask on an image using jquery/javascript/html5?
I am looking for a way to cat a part of an image, using another image as a mask.
I don't know if this is at all possible using web technologies. I am willing of using libraries (jquery, php, javascript) or anything available on the market that d开发者_高级运维oes just that.
In general, I want to create themes that use resources that I don't have to cut in order to make them in different shapes (rectangles, circles etc). I onlywant to be able to apply a mask to them on the fly.
I am aware of ImageMagick®
but cant figure out a way on how to use it to have such results without making my code ugly.
If you don't have a clue on what masking is, here's a link.
If I understand well you're talking about juxtaposing images. If so, you can encapsulate a div into another, like this:
<div id="div1">
<div id="<div2">
</div>
</div>
And then put your image as a CSS background for div2 and the mask for div1.
精彩评论