\Horde_Image_Exif

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), the Exiftool package (more complete but slower), or the bundled exif library.

Summary

Methods
Properties
Constants
factory()
intel2Moto()
getCategories()
getTitleFields()
getDescriptionFields()
getFields()
getHumanReadable()
No public properties found
No constants found
_formatExposure()
_convertToFraction()
$_titleFields
$_descriptionFields
N/A
No private methods found
No private properties found
N/A

Properties

$_titleFields

$_titleFields : 

Type

$_descriptionFields

$_descriptionFields : 

Type

Methods

factory()

factory(string  $driver = null, array  $params = array()) : \Horde_Image_Exif

Factory method for instantiating a Horde_Image_Exif object.

Parameters

string $driver
array $params

Returns

\Horde_Image_Exif

intel2Moto()

intel2Moto(string  $intel) : string

Converts from Intel to Motorola endien.

Just reverses the bytes (assumes hex is passed in)

Parameters

string $intel

Returns

string

getCategories()

getCategories() : array

Obtains an array of supported meta data fields.

Returns

array

getTitleFields()

getTitleFields(mixed  $driver = null) : array

Returns a list of metadata fields that can by used for image titles.

Parameters

mixed $driver

A Horde_Image_Exif_Base instance or a string specifying the driver in use.

Returns

array —

An array of metadata field name hashes.

getDescriptionFields()

getDescriptionFields(mixed  $driver = null) : array

Returns a list of metadata fields that can by used for image descriptions.

Parameters

mixed $driver

A Horde_Image_Exif_Base instance or a string specifying the driver in use.

Returns

array —

An array of metadata field hashes.

getFields()

getFields(mixed  $driver = null, boolean  $description_only = false) : array

Returns a flattened array of supported metadata fields.

Parameters

mixed $driver

A Horde_Image_Exif_Base instance or a string specifying the driver in use.

boolean $description_only

Only return the field descriptions.

Returns

array

getHumanReadable()

getHumanReadable(string  $field, string  $data) : string

Converts 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.

Parameters

string $field

The name of the field to translate.

string $data

The data value to translate.

Returns

string —

The converted data.

_formatExposure()

_formatExposure(  $data) 

More human friendly exposure formatting.

Parameters

$data

_convertToFraction()

_convertToFraction(  $v,   $n,   $d) 

Converts a floating point number into a fraction.

Many thanks to Matthieu Froment for this code.

(Ported from the Exifer library).

Parameters

$v
$n
$d