- Code: Select all
if(!empty($_POST)){
$convertString = "convert $source -crop ".$_POST['w'].""."x"."".$_POST['x']."+".$_POST['h']."+".$_POST['w']." $file";
exec($convertString);
}
below is the actual form (html)
- Code: Select all
<form action="cropper.php" method="post" onsubmit="return checkCoords();">
<input type="hidden" id="x" name="x" />
<input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" />
<input type="hidden" id="h" name="h" />
<input type="submit" value="Crop" />
</form>

