4 * Exposes a method for extracting metadata from JPEGs.
6 * @module mediawiki.libs.jpegmeta
10 * Extract metadata from a JPEG.
13 * const binReader = new FileReader();
14 * binReader.onload = function () {
15 * const binStr = binReader.result;
16 * const jpegmeta = require( 'mediawiki.libs.jpegmeta' );
17 * const meta = jpegmeta( binStr, 'foo.jpg' );
19 * binReader.readAsBinaryString( upload.file );
21 * @method (require("mediawiki.libs.jpegmeta"))
22 * @param {string} fileReaderResult Binary string
23 * @param {string} fileName
24 * @return {Object} A {@link https://github.com/bennoleslie/jsjpegmeta JpegMeta.JpegFile} object
26 module.exports = function ( fileReaderResult, fileName ) {
27 return new JpegMeta.JpegFile( fileReaderResult, fileName );