Download the PHP package frameright/image-metadata-parser without Composer
On this page you can find all versions of the php package frameright/image-metadata-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download frameright/image-metadata-parser
More information about frameright/image-metadata-parser
Files in frameright/image-metadata-parser
Package image-metadata-parser
Short Description Image metadata parsing library
License MIT
Informations about the package image-metadata-parser
Image metadata parsing library (PHP 5.5+)
➡️ See this document rendered at docs.frameright.io/php
NOTE: this is based on dchesterton/image. Many thanks to dchesterton!
Supported image types:
- JPEG
- PNG
WEBP
Supported image meta types:
- XMP
- IPTC
EXIF
NOTE: a TypeScript equivalent of this library is available here.
Installation
Pull the library in your project via Composer
with the following composer.json
:
Dependencies: php-xml
Usage
:sparkles: Getting started
:wrench: Contributing
:memo: Tutorial
Get metadata
Loading specific image type
When file type is known, you can load the file type directly using the file types' fromFile
method.
Instantiate from bytes
If you don't have a file to work with but you do have the image stored in a string (from database, ImageMagick etc.) you can easily instantiate an object from the string.
Instantiate from GD or a stream
You can also create an object from a GD resource or a stream.
Aggregate metadata
When just want a piece of metadata and don't care whether it's from XMP, IPTC or EXIF, you can use the aggregate meta object.
By default it checks XMP first, then IPTC, then EXIF but you can change the priority:
You can also exclude a metadata type if you do not want to use it:
Get GPS data
All versions of image-metadata-parser with dependencies
ext-xml Version *