mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-08 03:15:40 +00:00
20 lines
477 B
PHP
20 lines
477 B
PHP
<?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;
|
|
}
|
|
?>
|