# Tags relating to image structure
'ImageWidth' => Exif::SHORT_OR_LONG, # Image width
'ImageLength' => Exif::SHORT_OR_LONG, # Image height
# Tags relating to image structure
'ImageWidth' => Exif::SHORT_OR_LONG, # Image width
'ImageLength' => Exif::SHORT_OR_LONG, # Image height
# "When a primary image is JPEG compressed, this designation is not"
# "necessary and is omitted." (p23)
'Compression' => Exif::SHORT, # Compression scheme #p23
# "When a primary image is JPEG compressed, this designation is not"
# "necessary and is omitted." (p23)
'Compression' => Exif::SHORT, # Compression scheme #p23
'Orientation' => Exif::SHORT, # Orientation of image #p24
'SamplesPerPixel' => Exif::SHORT, # Number of components
'PlanarConfiguration' => Exif::SHORT, # Image data arrangement #p24
'Orientation' => Exif::SHORT, # Orientation of image #p24
'SamplesPerPixel' => Exif::SHORT, # Number of components
'PlanarConfiguration' => Exif::SHORT, # Image data arrangement #p24
'YCbCrPositioning' => Exif::SHORT, # Y and C positioning #p24-25
'XResolution' => Exif::RATIONAL, # Image resolution in width direction
'YResolution' => Exif::RATIONAL, # Image resolution in height direction
'YCbCrPositioning' => Exif::SHORT, # Y and C positioning #p24-25
'XResolution' => Exif::RATIONAL, # Image resolution in width direction
'YResolution' => Exif::RATIONAL, # Image resolution in height direction
# Tags relating to image data characteristics
'TransferFunction' => Exif::IGNORE, # Transfer function
# Tags relating to image data characteristics
'TransferFunction' => Exif::IGNORE, # Transfer function
- 'WhitePoint' => array( Exif::RATIONAL, 2 ), # White point chromaticity
- 'PrimaryChromaticities' => array( Exif::RATIONAL, 6 ), # Chromaticities of primarities
+ 'WhitePoint' => [ Exif::RATIONAL, 2 ], # White point chromaticity
+ 'PrimaryChromaticities' => [ Exif::RATIONAL, 6 ], # Chromaticities of primarities
- 'YCbCrCoefficients' => array( Exif::RATIONAL, 3 ),
- 'ReferenceBlackWhite' => array( Exif::RATIONAL, 6 ), # Pair of black and white reference values
+ 'YCbCrCoefficients' => [ Exif::RATIONAL, 3 ],
+ 'ReferenceBlackWhite' => [ Exif::RATIONAL, 6 ], # Pair of black and white reference values
'Software' => Exif::ASCII, # Software used
'Artist' => Exif::ASCII, # Person who created the image
'Copyright' => Exif::ASCII, # Copyright holder
'Software' => Exif::ASCII, # Software used
'Artist' => Exif::ASCII, # Person who created the image
'Copyright' => Exif::ASCII, # Copyright holder
# @todo NOTE: Nonexistence of this field is taken to mean nonconformance
# to the Exif 2.1 AND 2.2 standards
'ExifVersion' => Exif::UNDEFINED, # Exif version
# @todo NOTE: Nonexistence of this field is taken to mean nonconformance
# to the Exif 2.1 AND 2.2 standards
'ExifVersion' => Exif::UNDEFINED, # Exif version
# Tags relating to image configuration
'ComponentsConfiguration' => Exif::UNDEFINED, # Meaning of each component #p33
'CompressedBitsPerPixel' => Exif::RATIONAL, # Image compression mode
# Tags relating to image configuration
'ComponentsConfiguration' => Exif::UNDEFINED, # Meaning of each component #p33
'CompressedBitsPerPixel' => Exif::RATIONAL, # Image compression mode
- 'PixelYDimension' => Exif::SHORT_OR_LONG, # Valid image width
- 'PixelXDimension' => Exif::SHORT_OR_LONG, # Valid image height
+ 'PixelYDimension' => Exif::SHORT_OR_LONG, # Valid image height
+ 'PixelXDimension' => Exif::SHORT_OR_LONG, # Valid image width
# Tags relating to related user information
'MakerNote' => Exif::IGNORE, # Manufacturer notes
# Tags relating to related user information
'MakerNote' => Exif::IGNORE, # Manufacturer notes
'LightSource' => Exif::SHORT, # Light source #p40-41
'Flash' => Exif::SHORT, # Flash #p41-42
'FocalLength' => Exif::RATIONAL, # Lens focal length
'LightSource' => Exif::SHORT, # Light source #p40-41
'Flash' => Exif::SHORT, # Flash #p41-42
'FocalLength' => Exif::RATIONAL, # Lens focal length
'FlashEnergy' => Exif::RATIONAL, # Flash energy
'SpatialFrequencyResponse' => Exif::IGNORE, # Spatial frequency response. Not supported atm.
'FocalPlaneXResolution' => Exif::RATIONAL, # Focal plane X resolution
'FocalPlaneYResolution' => Exif::RATIONAL, # Focal plane Y resolution
'FocalPlaneResolutionUnit' => Exif::SHORT, # Focal plane resolution unit #p46
'FlashEnergy' => Exif::RATIONAL, # Flash energy
'SpatialFrequencyResponse' => Exif::IGNORE, # Spatial frequency response. Not supported atm.
'FocalPlaneXResolution' => Exif::RATIONAL, # Focal plane X resolution
'FocalPlaneYResolution' => Exif::RATIONAL, # Focal plane Y resolution
'FocalPlaneResolutionUnit' => Exif::SHORT, # Focal plane resolution unit #p46
'ExposureIndex' => Exif::RATIONAL, # Exposure index
'SensingMethod' => Exif::SHORT, # Sensing method #p46
'FileSource' => Exif::UNDEFINED, # File source #p47
'ExposureIndex' => Exif::RATIONAL, # Exposure index
'SensingMethod' => Exif::SHORT, # Sensing method #p46
'FileSource' => Exif::UNDEFINED, # File source #p47
'SubjectDistanceRange' => Exif::SHORT, # Subject distance range #p51
'ImageUniqueID' => Exif::ASCII, # Unique image ID
'SubjectDistanceRange' => Exif::SHORT, # Subject distance range #p51
'ImageUniqueID' => Exif::ASCII, # Unique image ID
'GPSVersion' => Exif::UNDEFINED,
# Should be an array of 4 Exif::BYTE's. However php treats it as an undefined
# Note exif standard calls this GPSVersionID, but php doesn't like the id suffix
'GPSLatitudeRef' => Exif::ASCII, # North or South Latitude #p52-53
'GPSVersion' => Exif::UNDEFINED,
# Should be an array of 4 Exif::BYTE's. However php treats it as an undefined
# Note exif standard calls this GPSVersionID, but php doesn't like the id suffix
'GPSLatitudeRef' => Exif::ASCII, # North or South Latitude #p52-53
'GPSAltitudeRef' => Exif::UNDEFINED,
# Altitude reference. Note, the exif standard says this should be an EXIF::Byte,
# but php seems to disagree.
'GPSAltitude' => Exif::RATIONAL, # Altitude
'GPSAltitudeRef' => Exif::UNDEFINED,
# Altitude reference. Note, the exif standard says this should be an EXIF::Byte,
# but php seems to disagree.
'GPSAltitude' => Exif::RATIONAL, # Altitude
'GPSSatellites' => Exif::ASCII, # Satellites used for measurement
'GPSStatus' => Exif::ASCII, # Receiver status #p54
'GPSMeasureMode' => Exif::ASCII, # Measurement mode #p54-55
'GPSSatellites' => Exif::ASCII, # Satellites used for measurement
'GPSStatus' => Exif::ASCII, # Receiver status #p54
'GPSMeasureMode' => Exif::ASCII, # Measurement mode #p54-55
'GPSImgDirection' => Exif::RATIONAL, # Direction of image
'GPSMapDatum' => Exif::ASCII, # Geodetic survey data used
'GPSDestLatitudeRef' => Exif::ASCII, # Reference for latitude of destination #p56
'GPSImgDirection' => Exif::RATIONAL, # Direction of image
'GPSMapDatum' => Exif::ASCII, # Geodetic survey data used
'GPSDestLatitudeRef' => Exif::ASCII, # Reference for latitude of destination #p56
'GPSDestBearingRef' => Exif::ASCII, # Reference for bearing of destination #p57
'GPSDestBearing' => Exif::RATIONAL, # Bearing of destination
'GPSDestDistanceRef' => Exif::ASCII, # Reference for distance to destination #p57-58
'GPSDestBearingRef' => Exif::ASCII, # Reference for bearing of destination #p57
'GPSDestBearing' => Exif::RATIONAL, # Bearing of destination
'GPSDestDistanceRef' => Exif::ASCII, # Reference for distance to destination #p57-58
'GPSAreaInformation' => Exif::UNDEFINED, # Name of GPS area
'GPSDateStamp' => Exif::ASCII, # GPS date
'GPSDifferential' => Exif::SHORT, # GPS differential correction
'GPSAreaInformation' => Exif::UNDEFINED, # Name of GPS area
'GPSDateStamp' => Exif::ASCII, # GPS date
'GPSDifferential' => Exif::SHORT, # GPS differential correction
$this->makeFilteredData();
$this->collapseData();
$this->debugFile( __FUNCTION__, false );
$this->makeFilteredData();
$this->collapseData();
$this->debugFile( __FUNCTION__, false );
foreach ( array_keys( $this->mRawExifData ) as $section ) {
if ( !array_key_exists( $section, $this->mExifTags ) ) {
foreach ( array_keys( $this->mRawExifData ) as $section ) {
if ( !array_key_exists( $section, $this->mExifTags ) ) {
- //ComponentsConfiguration should really be an array instead of a string...
- //This turns a string of binary numbers into an array of numbers.
+ // ComponentsConfiguration should really be an array instead of a string...
+ // This turns a string of binary numbers into an array of numbers.
if ( isset( $this->mFilteredExifData['ComponentsConfiguration'] ) ) {
$val = $this->mFilteredExifData['ComponentsConfiguration'];
if ( isset( $this->mFilteredExifData['ComponentsConfiguration'] ) ) {
$val = $this->mFilteredExifData['ComponentsConfiguration'];
$strLen = strlen( $val );
for ( $i = 0; $i < $strLen; $i++ ) {
$ccVals[$i] = ord( substr( $val, $i, 1 ) );
}
$strLen = strlen( $val );
for ( $i = 0; $i < $strLen; $i++ ) {
$ccVals[$i] = ord( substr( $val, $i, 1 ) );
}
- //GPSVersion(ID) is treated as the wrong type by php exif support.
- //Go through each byte turning it into a version string.
- //For example: "\x02\x02\x00\x00" -> "2.2.0.0"
+ // GPSVersion(ID) is treated as the wrong type by php exif support.
+ // Go through each byte turning it into a version string.
+ // For example: "\x02\x02\x00\x00" -> "2.2.0.0"
- //Also change exif tag name from GPSVersion (what php exif thinks it is)
- //to GPSVersionID (what the exif standard thinks it is).
+ // Also change exif tag name from GPSVersion (what php exif thinks it is)
+ // to GPSVersionID (what the exif standard thinks it is).
if ( isset( $this->mFilteredExifData['GPSVersion'] ) ) {
$val = $this->mFilteredExifData['GPSVersion'];
if ( isset( $this->mFilteredExifData['GPSVersion'] ) ) {
$val = $this->mFilteredExifData['GPSVersion'];
if ( isset( $this->mFilteredExifData[$prop] ) ) {
if ( strlen( $this->mFilteredExifData[$prop] ) <= 8 ) {
if ( isset( $this->mFilteredExifData[$prop] ) ) {
if ( strlen( $this->mFilteredExifData[$prop] ) <= 8 ) {
$this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, false );
unset( $this->mFilteredExifData[$prop] );
$this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, false );
unset( $this->mFilteredExifData[$prop] );
if ( $valCopy !== $val ) {
MediaWiki\suppressWarnings();
$val = iconv( 'Windows-1252', 'UTF-8//IGNORE', $val );
if ( $valCopy !== $val ) {
MediaWiki\suppressWarnings();
$val = iconv( 'Windows-1252', 'UTF-8//IGNORE', $val );
$this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, "$prop: Is only whitespace" );
unset( $this->mFilteredExifData[$prop] );
return;
}
$this->debug( $this->mFilteredExifData[$prop], __FUNCTION__, "$prop: Is only whitespace" );
unset( $this->mFilteredExifData[$prop] );
return;
}