Download the PHP package cnlpete/image-metadata-parser without Composer

On this page you can find all versions of the php package cnlpete/image-metadata-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package image-metadata-parser

Image-Metadata-Parser

Hi! Image-Metadata-Parser is a set of php function which try to simplify the access to some imagefiles metadata (exif, itpc or xmp).

Usage

To use Image-Metadata-Parser, you simply need to place the class somewhere accessible within your application.

Then you can create a new ParserObject with some imagefile and read its metadata.

<?php
include('inc/imageMetadataParser.php');

$imageparser = new ImageMetadataParser('path/to/imagefile.jpg');
if (!$imageparser->parseExif())
  echo "Parsing of Exif Data failed";
if (!$imageparser->parseIPTC())
  echo "Parsing of IPTC failed";

Get the title

if ($imageparser->hasTitle())
  echo "Image Title: " . $imageparser->getTitle();

get the date and time

if ($imageparser->hasDateTime())
  echo "Image Taken At: " . date('r', $imageparser->getDateTime());

get a thumbnail

if ($imageparser->hasThumbnail()) {
  echo "<img src='data:" . 
      $imageparser->getThumbnailContentType() .
      ";base64," .
      base64_encode( $imageparser->getThumbnail() ) .
      "' />";
}

check the orientation

if ($imageparser->hasOrientation())
  if ($imageparser->getOrientation() === 0)
    echo "Image is oriented properly.<br />\n";
  else
    echo "Image needs to be rotated with imagerotate(image, " . $imageparser->getOrientation() . ", 0);<br />\n";

get the gps coordinates

if ($imageparser->hasGPS()) {
  $dLat = 0; $dLong = 0;
  $imageparser->getGPS($dLat, $dLong);
  echo "approximate GPS position: " .
      "<a href='https://maps.google.com/maps?q=" . $dLat . "," . $dLong . "'>Lat: " . $dLat . " Long: " . $dLong . "</a>";
}

Hope you find it useful! :)


All versions of image-metadata-parser with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cnlpete/image-metadata-parser contains the following files

Loading the files please wait ....