Canvas Based Image Masking Plugin with jQuery ImgMask - Download Canvas Based Image Masking Plugin with jQuery - ImgMask

Download Canvas Based Image Masking Plugin with jQuery – ImgMask

Posted on

This time I will share jQuery Plugin and tutorial about Canvas Based Image Masking Plugin with jQuery – ImgMask, hope it will help you in programming stack.

Canvas Based Image Masking Plugin with jQuery ImgMask - Download Canvas Based Image Masking Plugin with jQuery - ImgMask
File Size: 91 KB
Views Total: 2089
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   



ImgMask is a jQuery image masking / overlapping plugin that replaces part of an image with a transparent image / pattern based on Html5 canvas technique.

Basic usage:

1. Load the latest version of jQuery library and the jQuery ImgMask plugin in the html document.

1 <script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
2 <script src="jquery.imgMask.min.js"></script>

2. Create an empty container element with an unique ID.

1 <div id="example"></div>

3. Call the function on the container element and specify the path to your image and mask files.

1 $('#example').imgMask({
2   objMask: 'mask.jpg',
3   source: 'source.png'
4 });

4. Plugin’s default settings.

01 $('#example').imgMask({
02  
03   // image or pattern
04   type: 'image',
05  
06   // base masking object
07   objMask: null,
08  
09   // source file into mask
10   source: null,
11  
12   // canvas width
13   width: null,
14  
15   // canvas height
16   height: null
17    
18 });

This awesome jQuery plugin is developed by desta88. For more Advanced Usages, please check the demo page or visit the official website.




source : jqueryscript.net