Which function to use for thumbnail creation imagecopyresampled() or imagecopyresized()?
i'm building a image uploading functionality in my website which g开发者_Go百科ives users the possibility to upload a picture of any size to the website. This picture gets automatically resized to a thumbnail size. I've browsed around for some code and i see some using the imagecopyresampled() function to resize and some the imagecopyresized(). Which one is the best to use? What are the differences?
imagecopyresized() copies a rectangular portion of one image to another image. dst_image is the destination image, src_image is the source image identifier.
imagecopyresampled() copies a rectangular portion of one image to another image, smoothly interpolating pixel values so that, in particular, reducing the size of an image still retains a great deal of clarity.
php.net is your friend
That seemed overly snarky. Sorry about that. Personally I always use imagecopyresampled()
精彩评论