Hi,

Refer to the screenshot: http://img70.imageshack.us/img70/5388/cropping9vr.jpg
The page was created using javascript. The width height etc are assigned and post via form to my php script. I've been trying to crop out a portion of this image using imagecopyresampled but no dice. The image always get out of my desired dimension.

Any ideas are greatly appreciated. My following are my php codes:
PHP Code:
$imageFile 'C:\flower.jpg';
list( 
$ow$oh ) = getimagesize$imageFile );
$big imagecreatefromjpeg$imageFile );
$thumb imagecreatetruecolor$_POST['maskwidth'], $_POST['maskheight'] );
    
imagecopyresampled$thumb$big00$_POST['posX'], $_POST['posY'], $_POST['maskwidth'], $_POST['maskheight'], $ow$oh );

// Content type
header('Content-type: image/jpeg');
imagejpeg($thumbnull100);
exit;