Questions tagged [exif-js]

JavaScript library for reading EXIF image metadata

github

https://github.com/exif-js/exif-js

syntax

EXIF.getData(img, function() {
  var allMetaData = EXIF.getAllTags(this);
});

demo

http://htmlpreview.github.io/?https://github.com/exif-js/exif-js/blob/master/example/index.html

49 questions
107
votes
13 answers

Property 'files' does not exist on type 'EventTarget' error in typescript

I am trying to access the value of the input file from my ionic 2 application but still I'm facing the issue of property files does not exist on type 'EventTarget'. As it is properly working in js but not in typescript. The code is given below: …
Chirag Chaudhari
  • 1,617
  • 3
  • 14
  • 20
7
votes
3 answers

Javascript: How to convert exif date time data to timestamp?

In javascript, while using exif-js to extract metadata of an image file, I am getting date time format as 2017:03:09 14:49:21. The value in the DateTimeOriginal property is formatted as YYYY:MMY:DD HH:MM:SS. When I use var d = new Date(2017:03:09…
Manthan Sheth
  • 75
  • 1
  • 5
6
votes
0 answers

Exif Orientation Image in React JS

I am using https://www.npmjs.com/package/react-exif-orientation-img package and images doesn't get displayed correctly in react.js Checked on chrome and mozilla but doesn't seem to work. image-orientation css property works only in Chrome so using…
Sharath
  • 2,348
  • 8
  • 45
  • 81
4
votes
0 answers

Get exif location data from HEIC

I am developing an app using cordova, I can get the location data from all JPEG files but when I am trying to get the location from a HEIC file all exif information are stripped even though I get the file as JPEG (so it's automatically converted…
Dominik
  • 57
  • 4
4
votes
3 answers

Detect in browser if PDF is locked or encrypted

In my application, a user can upload a PDF which other users can later view. For my usecase, I need to ensure that the PDFs are not locked or encrypted and can be viewed by any other user. To do this, I am asking users to upload unlocked PDFs and…
geoboy
  • 1,172
  • 1
  • 11
  • 25
3
votes
0 answers

EXIF data not available when upload image using camera in iPhone

I created component for image upload and it's display image details including the GPS location. I read the GPS details using EXIF data. Its work fine when we upload images using computer. Its also work fine if we use "Photo Library" or "Choose…
3
votes
1 answer

How to use exif-js in a react Component?

I am trying to get the exif metadata of an image that is uploaded with an input tag in react, and have the following function attached to the input tag's property "onChange": onChange(e) { const { input: { onChange } } = this.props; …
zengod
  • 1,114
  • 13
  • 26
3
votes
0 answers

how to get the colour mode of an image in javascript?

I have been using exif-js library and I can retrieve width, orientation, height, resolution and other metadata. But I cannot find the way to get the color mode of the image. I need to find out if the image is in CMYK or RGB. Has anyone done it with…
Marco
  • 624
  • 1
  • 6
  • 21
2
votes
1 answer

Angular with exif-js only on production mode not work correctly

When I make an ng serve on my project it's work just fine. But when I run ng build --prod --base-href then some problems connected with exif-js will show up. main-es2015.4f373a513488bb1e69c9.js:40745 ERROR ReferenceError: n is not defined at…
gringo
  • 86
  • 5
2
votes
1 answer

Convert event callback using `this` to promise carrying context

I'm using exif-js to extract EXIF information from camera/photo gallery images in a Ionic 3 app. I used to catch the onload event and retrieve the EXIF info in a callback and now I want to change the behaviour by using promises but I can't make it…
Alain1405
  • 2,259
  • 2
  • 21
  • 40
2
votes
2 answers

Change Undefined to Empty String

I'm using exif.js to pull metadata from images I upload to a CMS. When images do not have meta data, some values return "undefined". What I would like to do is change this "undefined" value to an empty string using something like this: (Credit:…
DzTheRage
  • 27
  • 1
  • 6
2
votes
2 answers

Importing exif-js library Uncaught ReferenceError: EXIF is not defined error

I am using vue in a rails application and am trying to import the exif-js library into my script in order to access the global EXIF variable to use as such var exif = EXIF.readFromBinaryFile(new BinaryFile(this.result)); I have downloaded the…
stcho
  • 1,909
  • 3
  • 28
  • 45
1
vote
0 answers

I can't get EXIF data from using exif-js in React

All the examples I've seen people use is the input onChange, but I need it to be from the img tag. Please help! import React from 'react'; import EXIF from 'exif-js'; const ImageMeta = () => { window.onload = getExif; function getExif() { …
GcodeG01
  • 91
  • 2
1
vote
1 answer

React - unable to use `this` to call component methods in callback function

I'm fairly new to React and currently working on a project that uses exif-js library to read image EXIF data, see sample code below. EXIF.getData(file, callback) is the method from this library for reading the given image and performing some other…
Dongminator
  • 795
  • 10
  • 15
1
vote
1 answer

Different rotation of image on PC and through input type file

Image is in jpeg format and it's being shown as it should on my PC (I'm using Ubuntu), but once I try to upload it through
nikname
  • 151
  • 1
  • 14
1
2 3 4