Har fundet løsningen :-)
Hvis andre skulle være interesseret:
1) Downloadede alt fra
http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/2) Brugte deres script til at få vist kordinater (har indsat værdierne i en form):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<title>Loading & displaying co-ordinates of crop area on attachment test</title>
<script src="
https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js" type="text/javascript"></script>
<script src="
https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js" type="text/javascript"></script>
<script src="/cropper.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
// setup the callback function
function onEndCrop( coords, dimensions ) {
$( 'x1' ).value = coords.x1;
$( 'y1' ).value = coords.y1;
$( 'x2' ).value = coords.x2;
$( 'y2' ).value = coords.y2;
$( 'width' ).value = dimensions.width;
$( 'height' ).value = dimensions.height;
}
// basic example
Event.observe(
window,
'load',
function() {
new Cropper.Img(
'testImage',
{
onEndCrop: onEndCrop,
displayOnInit: true,
onloadCoords: { x1: 65, y1: 287, x2: 935, y2: 462 }
}
)
}
);
</script>
<style type="text/css">
label {
clear: left;
margin-left: 50px;
float: left;
width: 5em;
}
html, body {
margin: 0;
}
#testWrap {
margin: 20px 0 0 50px; /* Just while testing, to make sure we return the correct positions for the image & not the window */
}
</style>
</head>
<body>
<h2>Loading & displaying co-ordinates of crop area on attachment test</h2>
<p>
Some test content before the image
</p>
<div id="testWrap">
<img src="/upload/DSC01408.jpg" alt="test image" id="testImage" width="1000" height="750" />
</div>
<form method="POST" action= "crop4-data.asp">
<p>
<label for="x1">x1:</label>
<input type="text" name="x1" id="x1" />
</p>
<p>
<label for="y1">y1:</label>
<input type="text" name="y1" id="y1" />
</p>
<p>
<label for="x2">x2:</label>
<input type="text" name="x2" id="x2" />
</p>
<p>
<label for="y2">y2:</label>
<input type="text" name="y2" id="y2" />
</p>
<p>
<label for="width">width:</label>
<input type="text" name="width" id="width" />
</p>
<p>
<label for="height">height</label>
<input type="text" name="height" id="height" />
</p>
<input type="submit" value="Beskær billede" name="B1" style="font-family: Verdana; font-size: 10 pt">
</form>
</body>
</html>
Koden til crop4-data.asp er:
<%
x = Request.form("x1")
y = Request.form("y1")
x1 = Request.form("x2")
y1 = Request.form("y2")
' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open(Server.MapPath("/upload/DSC01408.jpg"))
' Compute path to source image
'Path = Server.MapPath("/upload/DSC01408.jpg")
' Open source image
'Jpeg.Open Path
' Find højde og bredde
Jpeg.Width = Jpeg.OriginalWidth
Jpeg.Height = Jpeg.OriginalHeight
Jpeg.Crop X, Y, X1, Y1
Jpeg.Quality = 100
Jpeg.SendBinary
Jpeg.Save Server.MapPath("/upload/DSC01408kopi.jpg")
%>
olebole, smid et svar, og du får 100 point som tak for hjælpen.