{"id":22181009,"url":"https://github.com/easygithdev/imgmeta","last_synced_at":"2026-07-14T19:32:48.330Z","repository":{"id":56974354,"uuid":"185963967","full_name":"EasyGithDev/ImgMeta","owner":"EasyGithDev","description":"Wrapper to access Exif and IPTC data from an image","archived":false,"fork":false,"pushed_at":"2020-06-09T21:24:52.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T23:30:16.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EasyGithDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-10T09:53:38.000Z","updated_at":"2020-06-10T19:29:03.000Z","dependencies_parsed_at":"2022-08-21T11:50:15.189Z","dependency_job_id":null,"html_url":"https://github.com/EasyGithDev/ImgMeta","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FImgMeta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FImgMeta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FImgMeta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGithDev%2FImgMeta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EasyGithDev","download_url":"https://codeload.github.com/EasyGithDev/ImgMeta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245334914,"owners_count":20598389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T09:21:33.058Z","updated_at":"2025-10-19T21:29:11.692Z","avatar_url":"https://github.com/EasyGithDev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImgMeta\n\nWrapper to access Exif and IPTC data from an image.\n\n### Installing\n\nInstallation is quite typical - with composer:\n\n```\ncomposer require easygithdev/imgmeta\n```\n\n## How to use\n\nInclude the autoload, if you need.\n\n```\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\nuse ImgMeta\\ImgData;\n```\n\nDefine a stream. The stream is a file, a base64 string or an Url :\n\n```\n$stream = 'image.jpg';\n$stream = 'data:image/jpeg;base64,iVBOR....';\n$stream = 'http://domain/image.jpg';\n```\n\nAccessing to all the metas like this :\n\n```\n$imgData = new ImgData();\n$metas = $imgData-\u003eread($stream)-\u003egetMetas();\n```\n\nFetching the EXIF or IPTC tags :\n\n```\n$imgData-\u003eread($stream)-\u003egetExif()-\u003efetch(ExifTags::Copyright);\n$imgData-\u003eread($stream)-\u003egetIptc()-\u003efetch(IptcTags::City);\n```\n\nOr you can use the quick acces :\n```\n(new ImgData())-\u003eread($stream)-\u003eexif('Copyright');\n(new ImgData())-\u003eread($stream)-\u003eiptc('City');\n```\n\n### Working with EXIF only\n\nGet all the datas :\n\n```\n$imgData = new ImgData();\n$exifManager = $imgData-\u003ecreateExifManager();\n$exifManager-\u003eread(ExifReader::getReader($stream));\n$exifManager-\u003egetMetas();\n```\n\nFetch one tag :\n\n```\n$exifManager-\u003efetch(ExifTags::Copyright);\n```\n\nOr :\n\n```\n$exifManager-\u003efetch('Copyright');\n```\n\nFor example to fetch the GPS informations :\n\n```\n$latitude = $exifManager-\u003efetch('GPSLatitude');\n$longitude = $exifManager-\u003efetch('GPSLongitude');\n```\n\nUsing helper to get the GPS infos :\n\n```\n$exifManager-\u003egetPosition();\n```\n\n### Working with IPTC only\n\n```\n$imgData = new ImgData();\n$iptcManager = $imgData-\u003ecreateIptcManager();\n$iptcManager-\u003eread(IptcReader::getReader($stream));\n```\n\nGet IPTC default format :\n\n```\n$iptcManager-\u003egetMetas();\n```\n\nGet IPTC by Key :\n\n```\n$iptcManager-\u003egetMetasByKey();\n```\n\nGet IPTC by Name :\n\n```\n$iptcManager-\u003egetMetasByName();\n```\n\nGet IPTC by name with all keys :\n\n```\n$iptcManager-\u003egetAssocMetas(IptcManager::META_BY_NAME, true);\n```\n\nFetch one tag, datas are flatten :\n\n```\n$iptcManager-\u003efetch(IptcTags::Country_PrimaryLocationName);\n```\n\nFetch one tag, datas are originals :\n\n```\n$iptcManager-\u003efetchAll(IptcTags::Country_PrimaryLocationName);\n```\n\n## License\n\nThis project is licensed under GNU license - see the [LICENSE](LICENSE) file for deta\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasygithdev%2Fimgmeta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasygithdev%2Fimgmeta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasygithdev%2Fimgmeta/lists"}