Thanks so much! This worked perfectly.
For anyone looking to do the same thing, I modified the line beginning with $image->resize to include an array for x and y crop position, like so:
$image->resize($size[0], $size[1], array(“center”, “top”));