Class Ansel_ImageData

Description

General class for fetching and parsing EXIF information from images.

Works equally well with either the built in php exif functions (if PHP compiled with exif support) or the (slower) bundled exif library.

$Horde: ansel/lib/Exif.php,v 1.41.2.13 2010-09-08 17:02:23 mrubinsk Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

Located in /lib/Exif.php (line 15)


	
			
Method Summary
 static array getAttributes (Ansel_Image $image, [boolean $format = false])
 static array getFields ()
 array getExifData (Ansel_Image $image)
 string getHumanReadable (string $field, string $data)
 void _convertToFraction ( $v,  &$n,  &$d)
 void _degToDecimal ( $degrees,  $minutes,  $seconds)
 void _formatExposure ( $data)
 double _parseGPSData (mixed $data)
Methods
static getAttributes (line 28)

Get the image attributes from the backend.

  • return: The EXIF data.
static array getAttributes (Ansel_Image $image, [boolean $format = false])
  • Ansel_Image $image: The image to retrieve attributes for. attributes for.
  • boolean $format: Format the EXIF data. If false, the raw data is returned.
static getFields (line 495)

Get the list of Exif fields we support, and their descriptions.

  • return: Hash of fieldname => description.
static array getFields ()
getExifData (line 58)

Get the EXIF data from an image, process it, and return it.

array getExifData (Ansel_Image $image)
  • Ansel_Image $image: The image to read exif data from.
getHumanReadable (line 236)

Convert an exif field into human-readable form.

Some of these cases are ported from the Exifer library, others were changed from their implementation where the EXIF standard dictated different behaviour.

  • return: The converted data.
string getHumanReadable (string $field, string $data)
  • string $field: The name of the field to translate.
  • string $data: The data value to translate.
_convertToFraction (line 187)

Converts a floating point number into a fraction.

Many thanks to Matthieu Froment for this code.

(Ported from the Exifer library).

void _convertToFraction ( $v,  &$n,  &$d)
  • $v
  • &$n
  • &$d
_degToDecimal (line 155)
void _degToDecimal ( $degrees,  $minutes,  $seconds)
  • $degrees
  • $minutes
  • $seconds
_formatExposure (line 164)

More human friendly exposure formatting.

void _formatExposure ( $data)
  • $data
_parseGPSData (line 131)

Parse the Longitude and Latitude values into a standardized format regardless of the source format.

  • return: The location data in a decimal format.
double _parseGPSData (mixed $data)
  • mixed $data: An array containing degrees, minutes, seconds in index 0, 1, 2 respectifully.

Documentation generated on Sun, 30 Jan 2011 05:08:45 +0000 by phpDocumentor 1.4.3