{"id":15025750,"url":"https://github.com/ibudasov/php7-iptc-manager","last_synced_at":"2025-04-09T20:05:02.875Z","repository":{"id":56988445,"uuid":"131510690","full_name":"ibudasov/php7-iptc-manager","owner":"ibudasov","description":"Allows to manipulate IPTC image 🏞 tags from PHP7.* 🤙","archived":false,"fork":false,"pushed_at":"2023-06-08T15:57:09.000Z","size":28868,"stargazers_count":19,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T20:04:56.364Z","etag":null,"topics":["image","image-processing","iptc","iptc-metadata","php","php71"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibudasov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-29T16:30:05.000Z","updated_at":"2025-04-06T07:14:51.000Z","dependencies_parsed_at":"2022-08-21T12:50:33.198Z","dependency_job_id":null,"html_url":"https://github.com/ibudasov/php7-iptc-manager","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fphp7-iptc-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fphp7-iptc-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fphp7-iptc-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fphp7-iptc-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibudasov","download_url":"https://codeload.github.com/ibudasov/php7-iptc-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103868,"owners_count":21048245,"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":["image","image-processing","iptc","iptc-metadata","php","php71"],"created_at":"2024-09-24T20:02:57.663Z","updated_at":"2025-04-09T20:05:02.841Z","avatar_url":"https://github.com/ibudasov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [php7-iptc-manager](https://ibudasov.github.io/php7-iptc-manager/)\n\n[![CircleCI](https://circleci.com/gh/ibudasov/php7-iptc-manager.svg?style=svg)](https://circleci.com/gh/ibudasov/php7-iptc-manager)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8a0f32e9d6ff3948e4d6/maintainability)](https://codeclimate.com/github/ibudasov/php7-iptc-manager/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/8a0f32e9d6ff3948e4d6/test_coverage)](https://codeclimate.com/github/ibudasov/php7-iptc-manager/test_coverage)\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/ibudasov/php7-iptc-manager.svg?style=flat-square)](https://packagist.org/packages/ibudasov/php7-iptc-manager )\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\n### Why and what is it\n[IPTC tags](https://iptc.org) are tags, which you can include in a picture you have taken (remember Instagram?)\n\nThis library provides simple interface to do that, because standard PHP way sucks a lot.\n\nSo, let's get started! \n\n### Installation\n\nInstallation is quite typical - with composer: \n```\ncomposer require ibudasov/php7-iptc-manager\n```\n\n### How to use\n\nBefore usage you have to create the IPTC tags manager:\n```\n// import the Manager class\nuse iBudasov\\Iptc\\Manager;\n\n// ... and instantiate it!\n$manager = Manager::create();\n```\n\nOnce you have an instance of the Manager - you'll need to specify the file to work with.\n`['jpg', 'jpeg', 'pjpeg']` file types are supported, and if you try to feed something else - exception will be thrown\n\n```\n$manager-\u003eloadFile('/tmp/proper-file.jpg');\n```\n\n\n\n### Create an IPTC tag\nThen you can add some IPTC tags. \n\nThere are different kinds of IPTC tags, but for all of them you'll find a constant in `Tag` class.\n\nYou can specify multiple values for each tag, it is allowed by specification, so we have array of values:\n\n```\n$manager-\u003eaddTag(new Tag(Tag::AUTHOR, ['IGOR BUDASOV']));\n$manager-\u003ewrite();\n```\n\nIf a tag with the same name already exists - an exception will be thrown, so you can use `Manager::deleteTag()` to explicitly remove previous value.\n\nIt was made to avoid accidental removing of data. Yes, we were thinking about safety of your data!\n\n### Read an IPTC tag\n\nOnce you `loadFile()` all the included IPTC tags will be loaded to the Manager, so you can retrieve any tag by it's codename.\n\nIf this tag doesn't exist - you'll experience an exception.\n```\n$manager-\u003egetTag(Tag::AUTHOR)\n```\n\n...or you can get them all at once!\n```\n$manager-\u003egetTags();\n```\n\n### Delete an IPTC tag\n\nSometimes you want to delete a tag - here is the way.\n\nIf you're trying to delete a tag which does not exist - exception will be thrown.\n```\n$manager-\u003edeleteTag(Tag::AUTHOR);\n$manager-\u003ewrite();\n```\n\n\n### P.S.\n\nAll the code is nicely covered by tests, but if you find a bug - feel free to contact me!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibudasov%2Fphp7-iptc-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibudasov%2Fphp7-iptc-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibudasov%2Fphp7-iptc-manager/lists"}