Welcome Guest, Not a member yet? Register   Sign In
How to redirect user to the crop image?
#3

[eluser]Unknown[/eluser]
hi thanks for the reply and the welcome. actually i have zero knowledge about caching, so i only understand a little bit on your explanation.

Basically what i want to achieve is exactly same as this demo:
http://deepliquid.com/projects/Jcrop/dem...=live_crop

The difference is only the crop dimension is not fixed.

This is the php code for the demo:

Code:
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
    $targ_w = $targ_h = 150;
    $jpeg_quality = 90;

    $src = 'demo_files/flowers.jpg';
    $img_r = imagecreatefromjpeg($src);
    $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );

    imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],
    $targ_w,$targ_h,$_POST['w'],$_POST['h']);

    header('Content-type: image/jpeg');
    imagejpeg($dst_r,null,$jpeg_quality);

    exit;
}


Messages In This Thread
How to redirect user to the crop image? - by El Forum - 04-02-2010, 02:55 AM
How to redirect user to the crop image? - by El Forum - 04-02-2010, 03:47 AM
How to redirect user to the crop image? - by El Forum - 04-02-2010, 04:27 AM
How to redirect user to the crop image? - by El Forum - 04-18-2010, 05:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB