MediaWiki master
MediaWiki\Media\Exif Class Reference

Class to extract and validate Exif data from jpeg (and possibly tiff) files. More...

Public Member Functions

 __construct ( $file, $byteOrder='')
 
 getData ()
 Get $this->mRawExifData.
 
 getFilteredData ()
 Get $this->mFilteredExifData.
 

Static Public Member Functions

static version ()
 The version of the output format.
 

Detailed Description

Class to extract and validate Exif data from jpeg (and possibly tiff) files.

Definition at line 22 of file Exif.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Media\Exif::__construct ( $file,
$byteOrder = '' )
Parameters
string$fileFilename.
string$byteOrderType of byte ordering either 'BE' (Big Endian) or 'LE' (Little Endian). Default ''.
Todo
FIXME: The following are broke: SubjectArea. Need to test the more obscure tags. DigitalZoomRatio = 0/0 is rejected. need to determine if that's valid. Possibly should treat 0/0 = 0. need to read exif spec on that.

Definition at line 97 of file Exif.php.

References wfBaseName(), and wfWarn().

Member Function Documentation

◆ getData()

MediaWiki\Media\Exif::getData ( )

Get $this->mRawExifData.

Returns
array

Definition at line 667 of file Exif.php.

◆ getFilteredData()

MediaWiki\Media\Exif::getFilteredData ( )

Get $this->mFilteredExifData.

Returns
array

Definition at line 675 of file Exif.php.

◆ version()

static MediaWiki\Media\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.

Returns
int

Definition at line 691 of file Exif.php.

Referenced by MediaWiki\Media\JpegHandler\getSizeAndMetadata(), MediaWiki\Media\TiffHandler\getSizeAndMetadata(), MediaWiki\Media\ExifBitmapHandler\isFileMetadataValid(), and MediaWiki\Media\BitmapMetadataHandler\Tiff().


The documentation for this class was generated from the following file: