Hello, I don’t know which way to approach ... I have a picture that I get from the server, there is such a plugin http://odyniec.net/projects/imgareaselect/, it all works, then I select a piece of the picture, data sent to the server and so d ... With this question, no.
The fact is that it is necessary to limit the selection area to make it possible to select not the whole picture, but only part of it. For example, I received a picture and let me select only a specific area, here’s more clearly http://dl.dropbox.com/u/26399837/ Forums / flower2.jpg
Here is my code to select the entire image. I use jQuery.
<head> <script type="text/javascript" src="./jQuery/jquery-1.7.2.js"></script> <link rel="stylesheet" type="text/css" href="./jQuery/imgareaselect-0.9.8/css/imgareaselect-default.css" /> <script type="text/javascript" src="./jQuery/imgareaselect-0.9.8/scripts/jquery.min.js"></script> <script type="text/javascript" src="./jQuery/imgareaselect-0.9.8/scripts/jquery.imgareaselect.pack.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#target').imgAreaSelect({ handles : true, movable : false, resizable : false, autoHide : true, onSelectEnd : function(img, selection){ $("#target").attr("src","/JFreeeChartServlet/generateImg?x1=" + selection.x1 + "&y1=" + selection.y1 + "&x2=" + selection.x2 + "&y2=" + selection.y2 + "&width=" + selection.width + "&height=" + selection.height); } }); }); </script> <title>JFreeChart_Bsp</title> </head> <body> <img src="/JFreeeChartServlet/generateImg" id="target" alt="generateImg" height="750" width="1450" /> </body>
Thank!