Public Member Functions |
| __construct ($file, $byteOrder= '') |
| Constructor.
|
| collapseData () |
| Collapse some fields together.
|
| getData () |
| #@-
|
| getFilteredData () |
| Get $this->mFilteredExifData.
|
| makeFilteredData () |
| Make $this->mFilteredExifData.
|
Static Public Member Functions |
static | version () |
| #@-
|
Public Attributes |
const | ASCII = 2 |
| An 8-bit byte containing one 7-bit ASCII code.
|
const | BYTE = 1 |
| An 8-bit (1-byte) unsigned integer.
|
const | IGNORE = -1 |
| A fake value for things we don't want or don't support.
|
const | LONG = 4 |
| A 32-bit (4-byte) unsigned integer.
|
const | RATIONAL = 5 |
| Two LONGs.
|
const | SHORT = 3 |
| A 16-bit (2-byte) unsigned integer.
|
const | SHORT_OR_LONG = 6 |
| A 16-bit (2-byte) or 32-bit (4-byte) unsigned integer.
|
const | SLONG = 9 |
| A 32-bit (4-byte) signed integer (2's complement notation),.
|
const | SRATIONAL = 10 |
| Two SLONGs.
|
const | UNDEFINED = 7 |
| An 8-bit byte that can take any value depending on the field definition.
|
Private Member Functions |
| charCodeString ($prop) |
| Do userComment tags and similar.
|
| debug ($in, $fname, $action=null) |
| Convenience function for debugging output.
|
| debugFile ($fname, $io) |
| Convenience function for debugging output.
|
| exifGPStoNumber ($prop) |
| Convert gps in exif form to a single floating point number for example 10 degress 20`40`` S -> -10.34444.
|
| exifPropToOrd ($prop) |
| Convert an Exif::UNDEFINED from a raw binary string to its value.
|
| isASCII ($in) |
| isByte ($in) |
| Validates if a tag value is of the type it should be according to the Exif spec.
|
| isLong ($in) |
| isRational ($in) |
| isShort ($in) |
| isSlong ($in) |
| isSrational ($in) |
| isUndefined ($in) |
| validate ($section, $tag, $val, $recursive=false) |
| #@-
|
Private Attributes |
string | $basename |
| The basename of the file being processed *.
|
string | $byteOrder |
| The byte order of the file.
|
string | $file |
| The file being processed *.
|
string | $log = false |
| The private log to log to, e.g.
|
array | $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.
|
array | $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.
|
array | $mRawExifData |
| The raw Exif data returned by exif_read_data() *.
|
Class to extract and validate Exif data from jpeg (and possibly tiff) files.
Definition at line 32 of file Exif.php.
Collapse some fields together.
This converts some fields from exif form, to a more friendly form. For example GPS latitude to a single number.
The rationale behind this is that we're storing data, not presenting to the user For example a longitude is a single number describing how far away you are from the prime meridian. Well it might be nice to split it up into minutes and seconds for the user, it doesn't really make sense to split a single number into 4 parts for storage. (degrees, minutes, second, direction vs single floating point number).
Other things this might do (not really sure if they make sense or not): Dates -> mediawiki date format. convert values that can be in different units to be in one standardized unit.
As an alternative approach, some of this could be done in the validate phase if we make up our own types like Exif::DATE.
Definition at line 357 of file Exif.php.
#@-
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.
- Returns:
- int
Definition at line 579 of file Exif.php.
Referenced by ExifBitmapHandler\isMetadataValid().