JPEG images can optionally contain a hunk of auxillary data about the camera type, exposure, date/time, etc. This is called EXIF data. When the image gets resized or cropped or otherwise edited, this data can get lost. exif_copy will copy the EXIF block from the unmodified original image file to the new version.