Exif.js reading metadata for an image

Source: Internet
Author: User
Tags unique id color gamut

Exif.js provides a functional extension of the raw data that JavaScript reads from images, such as: Photo orientation, camera device model, shooting time, ISO sensitivity, GPS location, and more.

    • Precautions:
    • EXIF data mainly from the photos taken, more for mobile development, PC-side will also be used, this plugin compatible with mainstream browsers, IE10 below is not supported.

    • GitHub Address

Online example

Instance Preview Simple Example

Instance preview Get Base64 encoded file data

Instance previews get image data asynchronously

Loading JavaScript files using methods
    1. <script src="Exif.js"></script>
CopyGet EXIF Data
  1. EXIF.getData(document.getElementById(‘imgElement‘), function(){ 
  2.   EXIF.getAllTags(this); 
  3.   EXIF.getTag(this, ‘Orientation‘); 
  4. }); 
CopyAPI methods
name Description
Exif.getdata (IMG, callback)

Get the data for an image

Can be compatible with browsers that have not yet supported EXIF data to obtain metadata.

Exif.gettag (IMG, tag) Get a data for an image
Exif.getalltags (IMG) Gets all the data for the image, and the value is returned as an object
Exif.pretty (IMG) Gets all the data for the image, and the value is returned as a string
EXIF identification
name Description
Exifversion Exif version
Flashpixversion FlashPix version
ColorSpace Color gamut, color space
Pixelxdimension Effective width of the image
Pixelydimension Effective height of the image
Componentsconfiguration Image construction
Compressedbitsperpixel Color bits per pixel when compressing
Makernote Information about the manufacturer's settings
Usercomment User reviews
Relatedsoundfile Associated Sound files
Datetimeoriginal Creation time
Datetimedigitized Digital creation Time
Subsectime Date Time (seconds)
Subsectimeoriginal Original date time (seconds)
Subsectimedigitized Original date time digitization (seconds)
Exposuretime Exposure time
Fnumber Aperture value
Exposureprogram Exposure Program
Spectralsensitivity Spectral sensitivity
Isospeedratings Speed
Oecf Photoelectric conversion function
Shutterspeedvalue Shutter speed
Aperturevalue Lens aperture
Brightnessvalue Brightness
Exposurebiasvalue Exposure compensation
Maxaperturevalue Maximum aperture
Subjectdistance Material distance
Meteringmode Metering method
LightSource Light
Flash Flash
Subjectarea Main area
FocalLength Focal length
Flashenergy Flash strength
Spatialfrequencyresponse Spatial frequency response
Focalplanexresolution Resolution of focal plane X-axis
Focalplaneyresolution Resolution of the focal plane y-axis
Focalplaneresolutionunit Focal Plane resolution unit
Subjectlocation Main position
Exposureindex Exposure index
Sensingmethod Image sensor type
Filesource source file
Scenetype Scene type (1 = = Direct shot)
Cfapattern CFA mode
Customrendered Custom image Processing
Exposuremode Exposure mode
Whitebalance White balance (1 = = Automatic, 2 = = manual)
Digitalzoomration Digital zoom
Focallengthin35mmfilm 35 mm film focal length
Scenecapturetype Scene shooting Type
Gaincontrol Scene control
Contrast Contrast ratio
Saturation Saturation level
Sharpness Sharpness of
Devicesettingdescription Device Settings Description
Subjectdistancerange Body Distance Range
Interoperabilityifdpointer
Imageuniqueid Image Unique ID
Tiff-related
name Description
ImageWidth Image width
ImageHeight Image Height
BitsPerSample Bit sampling rate
Compression Compression method
Photometricinterpretation Pixel compositing
Orientation Shooting direction
Samplesperpixel Number of pixels
Planarconfiguration Data arrangement
Ycbcrsubsampling Hue sampling ratio
Ycbcrpositioning Hue Configuration
XResolution X-Directional resolution
YResolution Y-Direction resolution
Resolutionunit Resolution units
Stripoffsets Image Data Location
Rowsperstrip Number of rows per band
Stripbytecounts Number of bits per compression band
Jpeginterchangeformat JPEG SOI Offset
Jpeginterchangeformatlength Number of JPEG bits
Transferfunction Transfer function
Whitepoint White Point Chroma
Primarychromaticities Primary chroma
Ycbcrcoefficients Color space conversion matrix coefficients
Referenceblackwhite Black and white reference values
Datetime Date and time
Imagedescription Image description, source
Make Producers
Model Model
Software Software
Artist Author
Copyright Copyright information
GPS-related
name Description
Gpsversionid GPS version
Gpslatituderef South Latitude
Gpslatitude Latitude
Gpslongituderef Things by
Gpslongitude Longitude
Gpsaltituderef Altitude reference value
Gpsaltitude Elevation
Gpstimestamp GPS time Stamp
Gpssatellites Measurement of satellites
Gpsstatus Receiver Status
Gpsmeasuremode Measurement mode
Gpsdop Measurement accuracy
Gpsspeedref Speed Unit
Gpsspeed GPS receiver Speed
Gpstrackref Moving azimuth reference
Gpstrack Moving Directions
Gpsimgdirectionref Image Azimuth Reference
Gpsimgdirection Image orientation
Gpsmapdatum Geo-Surveying data
Gpsdestlatituderef Target Latitude Reference
Gpsdestlatitude Target Latitude
Gpsdestlongituderef Target Longitude Reference
Gpsdestlongitude Target Longitude
Gpsdestbearingref Target Azimuth Reference
Gpsdestbearing Target Orientation
Gpsdestdistanceref Target Distance Reference
Gpsdestdistance Target distance
Gpsprocessingmethod GPS Processing Method Name
Gpsareainformation GPS Area function Variable name
Gpsdatestamp GPS Date
Gpsdifferential GPS correction
Download

Exif.js reading metadata for an image

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.