mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-15 04:26:05 +00:00
Initial commit
This commit is contained in:
20
app/static/global/plugins/jcrop/crop-demo.php
Normal file
20
app/static/global/plugins/jcrop/crop-demo.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST')
|
||||
{
|
||||
$targ_w = $targ_h = 150;
|
||||
$jpeg_quality = 90;
|
||||
|
||||
$src = './demos/demo_files/image5.jpg';
|
||||
|
||||
$img_r = imagecreatefromjpeg($src);
|
||||
|
||||
$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );
|
||||
|
||||
imagecopyresampled($dst_r,$img_r,0,0,intval($_POST['x']),intval($_POST['y']), $targ_w,$targ_h, intval($_POST['w']),intval($_POST['h']));
|
||||
|
||||
header('Content-type: image/jpeg');
|
||||
imagejpeg($dst_r,null,$jpeg_quality);
|
||||
|
||||
exit;
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user