Now we will have the thumbnail into the file named by $filenameif(!strcmp("png",$ext))imagepng($dst_img,$filename); elseimagejpeg($dst_img,$filename); //destroys source and destination images. imagedestroy($dst_img); imagedestroy($src_img); }// This function reads the extension of the file. // It is used to determine if the file is an image by checking the extension. function getExtensio