https://github.com/gpslab/image-meta
Image meta parser
https://github.com/gpslab/image-meta
image-meta php
Last synced: over 1 year ago
JSON representation
Image meta parser
- Host: GitHub
- URL: https://github.com/gpslab/image-meta
- Owner: gpslab
- License: mit
- Created: 2016-09-16T13:50:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-01-13T08:05:04.000Z (over 6 years ago)
- Last Synced: 2025-02-15T10:19:05.218Z (over 1 year ago)
- Topics: image-meta, php
- Language: PHP
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/gpslab/image-meta)
[](https://packagist.org/packages/gpslab/image-meta)
[](https://travis-ci.org/gpslab/image-meta)
[](https://coveralls.io/github/gpslab/image-meta?branch=master)
[](https://scrutinizer-ci.com/g/gpslab/image-meta/?branch=master)
[](https://insight.sensiolabs.com/projects/4cfdc9e9-6bdb-406a-8340-aec2e844d6a1)
[](https://styleci.io/repos/68383765)
[](https://github.com/gpslab/image-meta)
Library for get image meta data
===============================
## Installation
Pretty simple with [Composer](http://packagist.org), run:
```sh
composer require gpslab/image-meta
```
## Usage
```php
$path = ''; // path to image
$analyzer = new ImageMetaAnalyzer();
$data = $analyzer->analyze($path);
// access from getters
echo $data->width();
echo $data->height();
echo $data->mime();
// access as array
$array = $data->toArray();
echo $array['width'];
echo $array['height'];
echo $array['mime'];
```
## License
This bundle is under the [MIT license](http://opensource.org/licenses/MIT). See the complete license in the file: LICENSE