Public Member Functions | |
__construct ($file) | |
Constructor. | |
makeFlatExifTags () | |
#@+ | |
extractTags (&$tagset) | |
A recursing extractor function used by makeFlatExifTags(). | |
makeFilteredData () | |
Make $this->mFilteredExifData. | |
makeFormattedData () | |
getData () | |
#@- | |
getFilteredData () | |
Get $this->mFilteredExifData. | |
getFormattedData () | |
Get $this->mFormattedExifData. | |
isByte ($in) | |
#@+ Validates if a tag value is of the type it should be according to the Exif spec | |
isASCII ($in) | |
isShort ($in) | |
isLong ($in) | |
isRational ($in) | |
isUndefined ($in) | |
isSlong ($in) | |
isSrational ($in) | |
validate ($tag, $val) | |
#@- | |
debug ($in, $fname, $action=NULL) | |
Convenience function for debugging output. | |
debugFile ($fname, $io) | |
Convenience function for debugging output. | |
Static Public Member Functions | |
static | version () |
#@- | |
Public Attributes | |
const | BYTE = 1 |
An 8-bit (1-byte) unsigned integer. | |
const | ASCII = 2 |
An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL. | |
const | SHORT = 3 |
A 16-bit (2-byte) unsigned integer. | |
const | LONG = 4 |
A 32-bit (4-byte) unsigned integer. | |
const | RATIONAL = 5 |
Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator. | |
const | UNDEFINED = 7 |
An 8-bit byte that can take any value depending on the field definition. | |
const | SLONG = 9 |
A 32-bit (4-byte) signed integer (2's complement notation),. | |
const | SRATIONAL = 10 |
Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator. | |
$mExifTags | |
Exif tags grouped by category, the tagname itself is the key and the type is the value, in the case of more than one possible value type they are separated by commas. | |
$mFlatExifTags | |
A one dimentional array of all Exif tags. | |
$mRawExifData | |
The raw Exif data returned by exif_read_data(). | |
$mFilteredExifData | |
A Filtered version of $mRawExifData that has been pruned of invalid tags and tags that contain content they shouldn't contain according to the Exif specification. | |
$mFormattedExifData | |
Filtered and formatted Exif data, see FormatExif::getFormattedData(). | |
$file | |
The file being processed. | |
$basename | |
The basename of the file being processed. | |
$log = false | |
The private log to log to, e.g. |
Definition at line 30 of file Exif.php.
Exif::__construct | ( | $ | file | ) |
Constructor.
$file | String: filename. |
Definition at line 104 of file Exif.php.
References $file, ASCII, BYTE, debugFile(), is(), LONG, makeFilteredData(), makeFlatExifTags(), makeFormattedData(), RATIONAL, SHORT, SRATIONAL, UNDEFINED, version(), wfBaseName(), wfRestoreWarnings(), and wfSuppressWarnings().
Exif::debug | ( | $ | in, | |
$ | fname, | |||
$ | action = NULL | |||
) |
Convenience function for debugging output.
$in | Mixed: | |
$fname | String: | |
$action | Mixed: , default NULL. |
Definition at line 561 of file Exif.php.
References $action, $in, $type, and wfDebugLog().
Referenced by isASCII(), isByte(), isLong(), isRational(), isShort(), isSlong(), isSrational(), isUndefined(), makeFilteredData(), and validate().
Exif::debugFile | ( | $ | fname, | |
$ | io | |||
) |
Convenience function for debugging output.
$fname | String: the name of the function calling this function | |
$io | Boolean: Specify whether we're beginning or ending |
Definition at line 588 of file Exif.php.
References wfDebugLog().
Referenced by __construct().
Exif::extractTags | ( | &$ | tagset | ) |
A recursing extractor function used by makeFlatExifTags().
Note: This used to use an array_walk function, but it made PHP5 segfault, see `cvs diff -u -r 1.4 -r 1.5 Exif.php`
Definition at line 328 of file Exif.php.
References $key.
Referenced by makeFlatExifTags().
Exif::getData | ( | ) |
Exif::getFilteredData | ( | ) |
Get $this->mFilteredExifData.
Definition at line 381 of file Exif.php.
Referenced by makeFormattedData().
Exif::isASCII | ( | $ | in | ) |
Exif::isByte | ( | $ | in | ) |
Exif::isLong | ( | $ | in | ) |
Exif::isRational | ( | $ | in | ) |
Exif::isShort | ( | $ | in | ) |
Exif::isSlong | ( | $ | in | ) |
Definition at line 485 of file Exif.php.
References $in, debug(), and isLong().
Referenced by isSrational(), and validate().
Exif::isSrational | ( | $ | in | ) |
Exif::isUndefined | ( | $ | in | ) |
Exif::makeFilteredData | ( | ) |
Make $this->mFilteredExifData.
Definition at line 341 of file Exif.php.
References debug(), and validate().
Referenced by __construct().
Exif::makeFlatExifTags | ( | ) |
#@+
Definition at line 318 of file Exif.php.
References extractTags().
Referenced by __construct().
Exif::makeFormattedData | ( | ) |
Definition at line 362 of file Exif.php.
References getFilteredData().
Referenced by __construct().
Exif::validate | ( | $ | tag, | |
$ | val | |||
) |
#@-
Validates if a tag has a legal value according to the Exif spec
$tag | String: the tag to check. | |
$val | Mixed: the value of the tag. |
Definition at line 515 of file Exif.php.
References ASCII, BYTE, debug(), isASCII(), isByte(), isLong(), isRational(), isShort(), isSlong(), isSrational(), isUndefined(), LONG, RATIONAL, SHORT, SLONG, SRATIONAL, and UNDEFINED.
Referenced by makeFilteredData().
static Exif::version | ( | ) | [static] |
#@-
The version of the output format Before the actual metadata information is saved in the database we strip some of it since we don't want to save things like thumbnails which usually accompany Exif data. This value gets saved in the database along with the actual Exif data, and if the version in the database doesn't equal the value returned by this function the Exif data is regenerated.
Definition at line 405 of file Exif.php.
Referenced by __construct(), BitmapHandler::getMetadata(), and BitmapHandler::isMetadataValid().
Exif::$file |
Exif::$mExifTags |
Exif::$mFilteredExifData |
Exif::$mFlatExifTags |
Exif::$mFormattedExifData |
Filtered and formatted Exif data, see FormatExif::getFormattedData().
Exif::$mRawExifData |
const Exif::ASCII = 2 |
An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL.
Definition at line 33 of file Exif.php.
Referenced by __construct(), and validate().
const Exif::BYTE = 1 |
An 8-bit (1-byte) unsigned integer.
Definition at line 32 of file Exif.php.
Referenced by __construct(), and validate().
const Exif::LONG = 4 |
A 32-bit (4-byte) unsigned integer.
Definition at line 35 of file Exif.php.
Referenced by __construct(), and validate().
const Exif::RATIONAL = 5 |
Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator.
Definition at line 36 of file Exif.php.
Referenced by __construct(), and validate().
const Exif::SHORT = 3 |
A 16-bit (2-byte) unsigned integer.
Definition at line 34 of file Exif.php.
Referenced by __construct(), and validate().
const Exif::SLONG = 9 |
A 32-bit (4-byte) signed integer (2's complement notation),.
Definition at line 38 of file Exif.php.
Referenced by validate().
const Exif::SRATIONAL = 10 |
Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator.
Definition at line 39 of file Exif.php.
Referenced by __construct(), and validate().
const Exif::UNDEFINED = 7 |
An 8-bit byte that can take any value depending on the field definition.
Definition at line 37 of file Exif.php.
Referenced by __construct(), and validate().