天天看点

jQuery的图片剪切插件2imgAreaSelect

Plugin features:

Highly configurable

Customizable with CSS styling

Handles scaled images

Keyboard support for moving and resizing the selection

Supports callback functions

Provides API functions for easier integration with other application components

Lightweight — the packed version is less than 8KB

The plugin works in all major browsers, including Firefox 2+, Opera 9.5+, Google Chrome, Safari 3+, and Internet Explorer 6+.

Click and drag on the image to select an area.

jQuery的图片剪切插件2imgAreaSelect

Selection Preview

jQuery的图片剪切插件2imgAreaSelect

Coordinates

Dimensions

X1:

Width:

Y1:

Height:

X2:

Y2:

Then, to enable selection on an image, wrap it in a jQuery object and call the <code>imgAreaSelect()</code> method:

<a></a>

For web developers who want to extend/modify the plugin, here's a fully documented version of the source code:

<a href="http://odyniec.net/projects/imgareaselect/jquery.imgareaselect.dev.js">jquery.imgareaselect.dev.js</a>

Dual licensed under the MIT and GPL licenses.

<a href="http://plugins.jquery.com/project/imgAreaSelect">imgAreaSelect on jQuery Plugins</a>

<a href="https://github.com/odyniec/imgareaselect">imgAreaSelect on GitHub</a>