Version 1.1
Imagetool is a simple plugin for jQuery providing basic cropping and scaling capabilities for images.
Click and drag the image to pan it. Ctrl-click (shift-click on Mac) to zoom.
Get it from the Googlecode project page
Sample photos by brentdanley
Preset visible area, a custom callback function and a "loading image".
$(function() {
$(".example2 img").imagetool({
viewportWidth: 600
,viewportHeight: 250
,topX: 209
,topY: 283
,bottomX: 696
,bottomY: 486
,callback: function(topX, topY, bottomX, bottomY) {
$("input.values").val("(" + topX + "," + topY + ")" + "(" + bottomX + "," + bottomY + ")");
}
,loading: "load.gif"
});
});
$(function() {
$(".imagetool").imagetool();
});
Copyright 2008 Bendik Rognlien Johansen <bendik.johansen (at) gmail.com>