CopyImgResize does not exist. All PHP image functions begin with "Image." From the way you phrased it, it sounded like you were resizing a thumbnail to create a larger image--this will result in a really crappy file.
What you're looking for is imagecopyresized().