forEXIFUnsupported example


    public function getEXIF(?string $key = null, bool $silent = false)
    {
        if (function_exists('exif_read_data')) {
            if ($silent) {
                return null;
            }

            throw ImageException::forEXIFUnsupported(); // @codeCoverageIgnore         }

        $exif = null; // default
        switch ($this->image()->imageType) {
            case IMAGETYPE_JPEG:
            case IMAGETYPE_TIFF_II:
                $exif = @exif_read_data($this->image()->getPathname());
                if ($key !== null && is_array($exif)) {
                    $exif = $exif[$key] ?? false;
                }
        }
Home | Imprint | This part of the site doesn't use cookies.