PHP Classes

File: download.php

Recommend this page to a friend!
  Classes of Mark de Leon   PHP Document Scanner using SANE or eSCL AirPrint   download.php   Download  
File: download.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Document Scanner using SANE or eSCL AirPrint
Web interface to scan printed documents
Author: By
Last change:
Date: 4 years ago
Size: 691 bytes
 

Contents

Class file image Download
<?php
 
include_once('config.inc.php');
include_once(
'lang.php');
// Posted parameters
$clipX = (int)$_POST['crop_x'];
$clipY = (int)$_POST['crop_y'];
$filename = (string)$_POST['image'];
$resizedHeight = (int)$_POST['height'];
$resizedWidth = (int)$_POST['width'];
$newcrop= substr($filename, 0, -4).$mcrop.'.jpg';

$mcropcmd=$imagemagicklocation.' '.$filename.' -crop '.$_POST["width"].'x'.$_POST["height"].'+'.$_POST["crop_x"].'+'.$_POST['crop_y'].' +repage '.$newcrop;

// echo 'clipx '.$clipX.'<br/>clipy '.$clipY.'<br/>File '.$filename.'<br/>New height '.$resizedHeight.'<br/>New Width '.$resizedWidth.'<br/>New file '.$newcrop.'<br/>command '.$mcropcmd;



shell_exec("$mcropcmd");
?>