Answers for "ex: .env"

0

ex: .env

case 'image/gif':                $core = @imagecreatefromgif($path);                break;             case 'image/webp':            case 'image/x-webp':                if ( ! function_exists('imagecreatefromwebp')) {                    throw new NotReadableException(                        "Unsupported image type. GD/PHP installation does not support WebP format."                    );                }                $core = @imagecreatefromwebp($path);                break;             default:                throw new NotReadableException(                    "Unsupported image type. GD driver is only able to decode JPG, PNG, GIF or WebP files."                );        }         if (empty($core)) {            throw new NotReadableException(                "Unable to decode image from file ({$path})."            );        }         $this->gdResourceToTruecolor($core);         // build image        $image = $this->initFromGdResource($core);        $image->mime = $mime;
Posted by: Guest on September-06-2021

Browse Popular Code Answers by Language