webgui/www/extras/yui/examples/imagecropper/assets/crop.php
Chris Nehren 8fdd413d12 * resizable text areas now use the YUI 2.5.0 code
* add the new YUI release
* document the change in both the changelog and gotcha.txt
2008-02-26 21:27:14 +00:00

24 lines
699 B
PHP

<?php
header('Content-Type: application/json');
/* yadl_spaceid - Skip Stamping */
include('exampleslib.inc');
// Use Services_JSON
require_once('JSON.php');
$json = new Services_JSON();
$h = getRawData('height');
$w = getRawData('width');
$t = getRawData('top');
$l = getRawData('left');
$data = 'Height: '.$h;
$data .= ', Width: '.$w;
$data .= ', Top: '.$t;
$data .= ', Left: '.$l;
$response = new stdclass();
$response->data = '<p>This example does not really resize, but here is the data we received: '.$data.'</p><p>If we used ImageMagick &amp; PHP we could issue this command: convert yui.jpg -crop ['.$w.' x '.$h.' + '.$l.' + '.$t.'] yui-new.jpg</p>';
echo($json->encode($response));
?>