Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
<?php
2
if ($_SERVER['REQUEST_METHOD'] == 'POST')
3
{
4
        $targ_w = $targ_h = 150;
5
        $jpeg_quality = 90;
6
 
7
        $src = './demos/demo_files/image5.jpg';
8
 
9
        $img_r = imagecreatefromjpeg($src);
10
 
11
        $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );
12
 
13
        imagecopyresampled($dst_r,$img_r,0,0,intval($_POST['x']),intval($_POST['y']), $targ_w,$targ_h, intval($_POST['w']),intval($_POST['h']));
14
 
15
        header('Content-type: image/jpeg');
16
        imagejpeg($dst_r,null,$jpeg_quality);
17
 
18
        exit;
19
}
20
?>