Hi I am getting error this error while upload image?
Error:Fatal error: Class 'Image' not found

Code:

$gallerycate_img            =   "gallerycateimg/".$_FILES["txt_photo"]["name"];
                    $gallerycate_image          =   $_FILES['txt_photo']['name'];

                    if (($_FILES["txt_photo"]["type"] == "image/jpeg")||($_FILES["txt_photo"]["type"] == "image/jpg")||($_FILES["txt_photo"]["type"] == "image/gif")||($_FILES["txt_photo"]["type"] == "image/png")&& ($_FILES["txt_photo"]["size"] < 200000000))
                    {
                             move_uploaded_file($_FILES["txt_photo"]["tmp_name"], "../gallerycateimg/" .$_FILES["txt_photo"]["name"]);              
                            copy("../".$gallerycate_img, "../gallerycateimg/thumb/".$gallerycate_image);
                            $file_thumb="../gallerycateimg/thumb/".$gallerycate_image;
                            $file_thumb_1="gallerycateimg/thumb/".$gallerycate_image;
                            $img = new Image($file_thumb);
                            $size = $img->getSize();
                            if($size['width']>350) $img->resize(350)->save();
                            elseif($size['height']>300) $img->resize(null, 250)->save();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.