Thanks,
Got it working.
<?php
// The file
$src = 'http://s2.evcdn.com/images/block250/I0-001/004/166/985-0.jpeg_/tiffany-alvord-85.jpeg';
$percent = 0.5;
header('Content-Type: image/jpeg');
list($width, $height) = getimagesize($src);
$new_width = 186;
$new_height = 146;
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($src);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
$dest = imagecreatefrompng('polastraight.png');
imagealphablending($dest, false);
imagesavealpha($dest, true);
imagecopymerge($dest, $image_p, 40, 38.5, 0, 0, 186, 146, 100);
header('Content-Type: image/png');
imagepng($dest);
imagedestroy($dest);
imagedestroy($src);
?>