Pimcore\Model\Asset\Image::getEXIFData PHP Method

getEXIFData() public method

public getEXIFData ( ) : array
return array
    public function getEXIFData()
    {
        $data = [];
        if (function_exists("exif_read_data") && is_file($this->getFileSystemPath())) {
            $supportedTypes = [IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM];
            if (in_array(@exif_imagetype($this->getFileSystemPath()), $supportedTypes)) {
                $exif = @exif_read_data($this->getFileSystemPath());
                if (is_array($exif)) {
                    foreach ($exif as $name => $value) {
                        if (is_string($value) && strlen($value) < 50 || is_numeric($value)) {
                            $data[$name] = \ForceUTF8\Encoding::toUTF8($value);
                        }
                    }
                }
            }
        }
        return $data;
    }