Creating PNG thumbnail using PHP
问题 I'm trying to create a thumbnail image it returned an error, that imagecopyresized() expects 2 parameter to be resource, but it can create the image but the output is only a small black image. here is my code $image = "asd.PNG"; $image_size = getimagesize($image); $image_width = $image_size[0]; $image_height = $image_size[1]; $new_size = ($image_width + $image_height)/($image_width*($image_height/45)); $new_width = $image_width * $new_size; $new_height = $image_height * $new_size; $new_image