Expand all

mediawiki.libs.jpegmeta

Exposes a method for extracting metadata from JPEGs.

Methods

(require("mediawiki.libs.jpegmeta"))(fileReaderResult, fileName) → {Object}inner #

Extract metadata from a JPEG.

Example

const binReader = new FileReader();
binReader.onload = function () {
  const binStr = binReader.result;
  const jpegmeta = require( 'mediawiki.libs.jpegmeta' );
  const meta = jpegmeta( binStr, 'foo.jpg' );
}
binReader.readAsBinaryString( upload.file );

Parameters:

Name Type Description
fileReaderResult string

Binary string

fileName string
Source:

Returns:

Type
Object
Extract metadata from a JPEG.