exif-reader
A small EXIF image metadata reader.
Usage
npm install exif-reader
var exif = ; // decode raw exif data from a buffervar metadata = ;
Support is also built into jpg-stream for extracting EXIF data from JPEGs using this module.
Resulting properties are grouped into four objects:
image
: basic TIFF properties about the imagethumbnail
: basic TIFF properties about the embedded thumbnailexif
: full exif datagps
: GPS/location data about the imageinteroperability
: interoperability information
Not all of these properties will always be defined.
Here is some example output:
image: Make: 'Apple' Model: 'iPhone 6' Orientation: 1 XResolution: 72 YResolution: 72 ResolutionUnit: 2 Software: 'Photos 1.0' ModifyDate: Sat Feb 28 2015 17:13:57 GMT- ExifOffset: 198 GPSInfo: 1008 exif: ExposureTime: 00020491803278688526 FNumber: 22 ExposureProgram: 2 ISO: 32 ExifVersion: <Buffer 30 32 32 31> DateTimeOriginal: Sat Feb 28 2015 17:13:57 GMT- DateTimeDigitized: Sat Feb 28 2015 17:13:57 GMT- ComponentsConfiguration: <Buffer 01 02 03 00> ShutterSpeedValue: 8930864197530864 ApertureValue: 22750072066878064 BrightnessValue: 7991 ExposureBiasValue: 0 MeteringMode: 3 Flash: 16 FocalLength: 415 SubjectArea: 964 1287 610 612 MakerNote: <Buffer 41 70 70 6c 65 20 69 4f 53 00 00 01 4d 4d 00 08 00 ...> SubSecTimeOriginal: '476' SubSecTimeDigitized: '476' FlashpixVersion: <Buffer 30 31 30 30> ColorSpace: 1 PixelXDimension: 3264 PixelYDimension: 2448 SensingMethod: 2 SceneType: <Buffer 01> ExposureMode: 0 WhiteBalance: 0 FocalLengthIn35mmFormat: 29 SceneCaptureType: 0 LensSpecification: 415 415 22 22 LensMake: 'Apple' LensModel: 'iPhone 6 back camera 4.15mm f/2.2' gps: GPSLatitudeRef: 'N' GPSLatitude: 35 18 149 GPSLongitudeRef: 'W' GPSLongitude: 120 39 4423 GPSAltitudeRef: 0 GPSAltitude: 97 GPSTimeStamp: 1 13 57 GPSSpeedRef: 'K' GPSSpeed: 0 GPSImgDirectionRef: 'T' GPSImgDirection: 3474401408450704 GPSDestBearingRef: 'T' GPSDestBearing: 16744014084507043 GPSDateStamp: '2015:03:01'
License
MIT