area selection on image using javascript

Solutions on MaxInterview for area selection on image using javascript by the best coders in the world

showing results for - "area selection on image using javascript"
Jerónimo
23 Sep 2016
1<html>
2    <head>
3        <title>Image Processs</title>
4        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.15/css/jquery.Jcrop.css">
5        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
6        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.15/js/jquery.Jcrop.js"></script>
7        </head>
8    <body>
9        <img src="https://i.stack.imgur.com/UYYqo.jpg" alt="" id="image">
10        <script>
11            $(document).ready(function(){
12                $('#image').Jcrop({
13                    onSelect: function(c){
14                        console.log(c);
15
16                        console.log(c.x);
17                        console.log(c.y);
18                        console.log(c.w);
19                        console.log(c.h);
20                    }
21                })
22            })
23        </script>
24    </body>    
25    </html>