Skip to content

gpslab/image-meta

Repository files navigation

Latest Stable Version Total Downloads Build Status Coverage Status Scrutinizer Code Quality SensioLabs Insight StyleCI License

Library for get image meta data

Installation

Pretty simple with Composer, run:

composer require gpslab/image-meta

Usage

$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. See the complete license in the file: LICENSE