okay so, ich hab nun Wurzels Script ausprobiert.. nich schlecht das Teil nur leider funktioniert das nicht.
Also Mein Bild habe ich einem Div eingefügt:
nun habe ich die Funktion gesucht, die für das "Beschneiden" zuständig ist:
nun im Body:
Nur leider will das nicht funktionieren, Wurzel kannst du mir bitte helfen?
merci bb Dennis
Also Mein Bild habe ich einem Div eingefügt:
<div id=bounds style="BACKGROUND-image:url(skizze.jpg); border: 1px solid red; width:333px; height:500px; position: absolute; top:70px; left: 50px;">
<DIV onmouseup="endLayerDrag()" onmousedown="startLayerDragCrop('myCrop')" id="myCrop" class="thecrop" style="cursor:move;LEFT: 0px;TOP: 0px;WIDTH: 0px;HEIGHT: 0px; visibility:hidden;"></DIV>
<DIV onmouseup="endLayerDrag();" onmousedown="startLayerDragCrop('myWm')" id="myWm" class="thecrop" style="LEFT: 0px;TOP: 0px;WIDTH: 1px;HEIGHT: 1px; visibility:hidden;"><img src="spacer.gif" width="1" height="1" name="wmImage" border="0" alt=""></DIV>
</div>
<DIV onmouseup="endLayerDrag()" onmousedown="startLayerDragCrop('myCrop')" id="myCrop" class="thecrop" style="cursor:move;LEFT: 0px;TOP: 0px;WIDTH: 0px;HEIGHT: 0px; visibility:hidden;"></DIV>
<DIV onmouseup="endLayerDrag();" onmousedown="startLayerDragCrop('myWm')" id="myWm" class="thecrop" style="LEFT: 0px;TOP: 0px;WIDTH: 1px;HEIGHT: 1px; visibility:hidden;"><img src="spacer.gif" width="1" height="1" name="wmImage" border="0" alt=""></DIV>
</div>
function resizeCropTo()
{
maxX2=100;
maxY2=100;
document.getElementById('myCrop').style.left = '0px';
document.getElementById('myCrop').style.top = '0px';
cropX = Math.abs(document.forms['scaleF'].cropX.value);
cropY = Math.abs(document.forms['scaleF'].cropY.value);
if(cropX == '')
cropX = document.forms['scaleF'].cropX.value = 0;
else if(cropX > maxX2)
cropX = document.forms['scaleF'].cropX.value = maxX2;
if(cropY == '')
cropY = document.forms['scaleF'].cropY.value = 0;
else if(cropY > maxY2)
cropY = document.forms['scaleF'].cropY.value = maxY2;
document.getElementById('myCrop').style.width = cropX + 'px';
document.getElementById('myCrop').style.height = cropY + 'px';
}
resizeCropTo();
{
maxX2=100;
maxY2=100;
document.getElementById('myCrop').style.left = '0px';
document.getElementById('myCrop').style.top = '0px';
cropX = Math.abs(document.forms['scaleF'].cropX.value);
cropY = Math.abs(document.forms['scaleF'].cropY.value);
if(cropX == '')
cropX = document.forms['scaleF'].cropX.value = 0;
else if(cropX > maxX2)
cropX = document.forms['scaleF'].cropX.value = maxX2;
if(cropY == '')
cropY = document.forms['scaleF'].cropY.value = 0;
else if(cropY > maxY2)
cropY = document.forms['scaleF'].cropY.value = maxY2;
document.getElementById('myCrop').style.width = cropX + 'px';
document.getElementById('myCrop').style.height = cropY + 'px';
}
resizeCropTo();
<body onmouseup="endLayerDrag();endResize();">
merci bb Dennis
Kommentar