if you take a look at
imagecopymerge() docs, the 7th and 8th arguments represent the source image width and height amount. You appear to pass the target image height (612, 792), so basically you're trying to copy a 612x792 slice from your logo image, which looks much smaller.
I'll try to better describe the arguments:
$res = imagecopymerge( $stamp, // <- target image $im, // <- source image, from where to copy (logo) $centerX, // <- target x-position (where to place your logo), $centerY, // <- target y-position 0, // <- source x-position (x-offset from where to start copy) 0, // <- source y-position imagesx($im), // <- amount to copy from source (width) imagesy($im), // <- amount... (height) 15 // <- i have no idea what this is :) );