MediaWiki REL1_31
|
Class for reading jpegs and extracting metadata. More...
Static Public Member Functions | |
static | doPSIR ( $app13) |
This reads the photoshop image resource. | |
static | segmentSplitter ( $filename) |
Function to extract metadata segments of interest from jpeg files based on GIFMetadataExtractor. | |
Public Attributes | |
const | MAX_JPEG_SEGMENTS = 200 |
Static Private Member Functions | |
static | jpegExtractMarker (&$fh) |
Helper function for jpegSegmentSplitter. | |
Class for reading jpegs and extracting metadata.
see also BitmapMetadataHandler.
Based somewhat on GIFMetadataExtractor.
Definition at line 32 of file JpegMetadataExtractor.php.
|
static |
This reads the photoshop image resource.
Currently it only compares the iptc/iim hash with the stored hash, which is used to determine the precedence of the iptc data. In future it may extract some other info, like url of copyright license.
This should generally be called by BitmapMetadataHandler::doApp13()
string | $app13 | Photoshop psir app13 block from jpg. |
MWException | (It gets caught next level up though) |
Definition at line 210 of file JpegMetadataExtractor.php.
References wfUnpack().
Referenced by BitmapMetadataHandler\doApp13(), JpegMetadataExtractorTest\testIPTCHashComparisionBadHash(), JpegMetadataExtractorTest\testIPTCHashComparisionGoodHash(), and JpegMetadataExtractorTest\testIPTCHashComparisionNoHash().
|
staticprivate |
Helper function for jpegSegmentSplitter.
resource | &$fh | File handle for JPEG file |
MWException |
Definition at line 179 of file JpegMetadataExtractor.php.
References wfUnpack().
Referenced by segmentSplitter().
|
static |
Function to extract metadata segments of interest from jpeg files based on GIFMetadataExtractor.
we can almost use getimagesize to do this but gis doesn't support having multiple app1 segments and those can't extract xmp on files containing both exif and xmp data
string | $filename | Name of jpeg file |
MWException | If given invalid file. |
Definition at line 50 of file JpegMetadataExtractor.php.
References $buffer, XMPReader\isSupported(), jpegExtractMarker(), wfDebug(), and wfUnpack().
Referenced by BitmapMetadataHandler\Jpeg(), JpegMetadataExtractorTest\testBinaryCommentStripped(), JpegMetadataExtractorTest\testExifByteOrder(), ExifTest\testGPSExtraction(), JpegMetadataExtractorTest\testInfiniteRead(), JpegMetadataExtractorTest\testInfiniteRead2(), JpegMetadataExtractorTest\testIPTCHashComparisionBadHash(), JpegMetadataExtractorTest\testIPTCHashComparisionGoodHash(), JpegMetadataExtractorTest\testIPTCHashComparisionNoHash(), JpegMetadataExtractorTest\testIso88591Comment(), JpegMetadataExtractorTest\testMultipleComment(), JpegMetadataExtractorTest\testPSIRExtraction(), ExifTest\testUnicodeUserComment(), JpegMetadataExtractorTest\testUtf8Comment(), JpegMetadataExtractorTest\testXMPExtraction(), JpegMetadataExtractorTest\testXMPExtractionAltAppId(), and JpegMetadataExtractorTest\testXMPExtractionNullChar().
const JpegMetadataExtractor::MAX_JPEG_SEGMENTS = 200 |
Definition at line 33 of file JpegMetadataExtractor.php.