项目作者: ihgazni2

项目描述 :
handle EXIF of jpg/jpeg
高级语言: JavaScript
项目地址: git://github.com/ihgazni2/xexif.git
创建时间: 2018-05-24T21:17:40Z
项目社区:https://github.com/ihgazni2/xexif

开源协议:MIT License

下载


xexif

handle EXIF of jpg/jpeg, based on Exif2.31 2016

Install

npm install xexif

Usage


  1. var xexif = require("xexif")

1. load jpg/jpeg image file, return a arrayBuffer

  1. var app1ArrayBuf = xexif.getArrayBufFromImgFile("./1.jpg")

2. decode APP1(thigs include EXIF) to a stage-0 Dict,but this raw-data-dict is not good for reading/writing

  1. var app1s0 = xexif.decodeAPP1(app1ArrayBuf)

3. convert Dict of step3 to a more readable stage-1 Dict

  1. var app1s1 = xexif.readable(app1s0)

4.search a tag(loose mode)

  1. xexif.search("GPS",app1s1)

5.get a tag via a exact tagName ,which could be find in step 4

  1. xexif.get("GPSImgDirection",app1s1)

Doc Help Man


6.doc for help and guide

6.1 the APP1 SEG structure
  1. xexif.listStructure()
6.2 list all exif tags documented in DC-008-Translation-2016-E
  1. xexif.listExifTags()
6.3 explaination of the tag “Orientation”
  1. xexif.man("Orientation")

STANDARDS

(Exchangeable image file format for digital still cameras: Exif Version 2.31 )


Exif 2.31


PACKAGE DEPENDANY

(optional)


iconv-lite


CODE REFERENCE

(thanks to these two great projects)


1. ExifTool by Phil Harvey
2. exif-js


SOFTWARE REFERENCE


MagicEXIF


USEAGE SCREENSHOOTS


  1. var xexif = require("xexif")
  2. var app1ArrayBuf = xexif.getArrayBufFromImgFile("./1.jpg")
  3. var app1s0 = xexif.decodeAPP1(app1ArrayBuf)
  4. var app1s1 = xexif.readable(app1s0)
  5. app1s1



  1. xexif.search("GPS",app1s1)
  2. xexif.get("GPSImgDirection",app1s1)

  1. xexif.listStructure()

  1. xexif.listExifTags()

  1. xexif.man("Orientation")


TODO


1.write exif

2.encoder

3.MakerNote