mattiasw / exifreader Goto Github PK
View Code? Open in Web Editor NEWA JavaScript Exif info parser.
License: Mozilla Public License 2.0
A JavaScript Exif info parser.
License: Mozilla Public License 2.0
Please see picture from comment at FreemapSlovakia/freemap-v3-react#206 (comment)
ExifReader returns for Object Name
correct string Amonova Lúka
but for ImageDescription
and title
it returns incorrectly Amonova Lúka
.
Sites like https://www.thexifer.net/ and http://metapicz.com/ and also exiftool shows the string correctly for all fields.
I've found this code to be problematic on the IPTC branch:
if (dataView.getUint8(this._iptcDataOffset, false) !== 0x1c) {
throw new Error('Not an IPTC NAA resource tag.');
}
Apparently if it encounters an exif tag it doesn't know how to parse, reading the exif data fails entirely. Removing this code allows it to read all the exif tags properly for that image and sets the ones it doesn't know about as undefined-56 for example. I think this a better way to deal with reading the data so that at least some data can be read.
I don't see any HEIC support for exif data? Will it be implemented?
There is a fork from exif-js that supports HEIC:
https://github.com/exif-heic-js/exif-heic-js/blob/master/exif-heic.js#L525-L570
Hmm.. running your global example, and not seeing anything but the basic tags. All I need is the ImageDescription tag. Is it just an incorrectly saved png? Compression is off, and I am embedding the metatag in photoshop CS6 which is XMP based, so it should be ok... is the image wrong or my implementation?
Image Width | 400px |
---|---|
Image Height | 398px |
Bit Depth | 8 |
Color Type | RGB |
Compression | Deflate/Inflate |
Filter | Adaptive |
Interlace | Noninterlaced |
my picture gps info :
Latitude: 38;54;11.2115470000136952
Longitude:115;27;37.3150630000163375
but I got gps info is:
Latitude: 38;54;11.211547
Longitude:115;27;37.315063
Can you help me?
For some pictures (like http://www.freemap.sk:3000/gallery/pictures/67129/image) the returned value of eg. GPSLatitude
is
{"value":[21,13,24.539994984954866],"description":21.223483331940262}
but for others (like https://user-images.githubusercontent.com/26544966/30610062-66d59c6e-9d7d-11e7-8a7b-99a26d36a8ff.JPG) it is
{"value":"17,18.441667E","attributes":{},"description":"17,18.441667E"}
Could it be unified (in description
)?
Bower isn't able to resolve different versions of packages unless they have semver git tags published .e.g v1.1.1
See link
When I install ExifReader with npm using npm i exifreader
, exifreader.d.ts is not included in the package. I have to manually copy it from this repo into my project to get TypeScript types to work.
it'd be sweet to also support pngs so you don't need to think about what kind of image you're giving the reader.
At least running the tests don't work on a Windows setup.
Hi, Mattias. This library seems like what exif-js could have been and it also seems to have a much better API than its cousin (exif-js/exif-js#142) and using more modern internals, not to mention better build tools. And tests! You have tests, whee!
As its ugly cousin is essentially dead (ref exif-js/exif-js#206) I know a lot of people are looking for an alternative. Your library seems like the right thing to go for, but I guess people wonder "why does this seemingly better alternative have 2% of the popularity of its ugly cousin"? I think branding and marketing is basically the answer to that :-)
I would have a little section of the README dedicated to people coming from Exif JS for an alternative, listing the pros (and cons?) of using ExifReader. Then I'd refer people here using the exif-js issue tracker and pull requests.
I don't think failing noisily is the best approach. It seems it would be better to fail silently and return undefined or null if the tag doesn't exist. Leave it to the consumer of the result to verify a value was returned.
I get a TypeError "e.map is not a function" in exifreader.
How to reproduce
What I expected would happen:
That it reads the image.
What really happened:
exifreader throws an error.
Error reading file /media/data/pictures/sorted/2010er/2016/2016-06-29 Passbilder Linus/IMG_8225.CR2.jpg: TypeError: e.map is not a function
at Object.description (/home/andreas/SW-Projekte/phototags/node_modules/exifreader/dist/exif-reader.js:1:26789)
at g (/home/andreas/SW-Projekte/phototags/node_modules/exifreader/dist/exif-reader.js:1:36099)
at p (/home/andreas/SW-Projekte/phototags/node_modules/exifreader/dist/exif-reader.js:1:34904)
at /home/andreas/SW-Projekte/phototags/node_modules/exifreader/dist/exif-reader.js:1:36776
at Object.read (/home/andreas/SW-Projekte/phototags/node_modules/exifreader/dist/exif-reader.js:1:36808)
at y (/home/andreas/SW-Projekte/phototags/node_modules/exifreader/dist/exif-reader.js:1:40864)
at Object.m [as load] (/home/andreas/SW-Projekte/phototags/node_modules/exifreader/dist/exif-reader.js:1:40361)
at processFile (/home/andreas/SW-Projekte/phototags/main.js:134:23)
at /home/andreas/SW-Projekte/phototags/main.js:263:24
at Array.forEach ()
Hello Mattias,
I have a similar problem as in #26 . Special characters in certain fields are not displayed correctly. But it works with other fields. I made a dirty hack for myself: I run all fields through decodeURIComponent(escape(.....)). That's not a good idea, but it fixes my current problem. Do you have any idea why the encoding goes wrong? Using PHP with iptcparse I get correct values.
This is an example image: http://www.bildbetextung.de/img/slider/iptc_sample_13.jpg
Here is what i get with "expanded: true" (search for "ttingen") :
{
"exif": {
"ImageWidth": {
"value": 3543,
"description": 3543
},
"ImageLength": {
"value": 2362,
"description": 2362
},
"BitsPerSample": {
"value": [8, 8, 8],
"description": "8, 8, 8"
},
"PhotometricInterpretation": {
"value": 2,
"description": 2
},
"ImageDescription": {
"value": ["Planetenweg Göttingen Station Sonne Start des Weges in der Goethalle Der Planetenweg ist eine populärastronomische Installation im öffentlichen Raum in Göttingen. Der Planetenweg besteht aus aus zehn Bronzestelen, die die Sonne, die acht \"normalen\" Planenten unseres Sonnensystems sowie Pluto zeigen. Auf den Bronzestelen finden sich jeweils Informationen zu den Planeten. Der Göttinger Planentweg ist im Maßstab 1:2 Milliarden gehalten. Zwei Millarden Kilometer im Weltall entsprechen damit einem Kilometer auf dem Planetenweg. Die Erde schrumpft auf eine 6,5 Millimeter kleine Kugel; die Sonne ist dagegen 70 Zentimeter groß.\nDer Planetenweg erstreckt sich von der Sonnen-Stele in der Goethe-Allee bis zum Bismarckturm, wo die Pluto-Stele zu finden ist. Pluto wurde am 26. August 2006 der Status als Planet aberkannt; Pluto ist seitdem nur noch ein \"Zwergplanet\".\nDer Planetenweg wurde initiiert vom Förderverein Planetarium Göttingen e.V.. Die Bronze-Stelen des Planentenwegs wurden durch Sponsorengelder finanziert und maßgeblich von Reinhold Wittig gestaltet. (Quelle: Wiki Göttingen)\n"],
"description": "Planetenweg Göttingen Station Sonne Start des Weges in der Goethalle Der Planetenweg ist eine populärastronomische Installation im öffentlichen Raum in Göttingen. Der Planetenweg besteht aus aus zehn Bronzestelen, die die Sonne, die acht \"normalen\" Planenten unseres Sonnensystems sowie Pluto zeigen. Auf den Bronzestelen finden sich jeweils Informationen zu den Planeten. Der Göttinger Planentweg ist im Maßstab 1:2 Milliarden gehalten. Zwei Millarden Kilometer im Weltall entsprechen damit einem Kilometer auf dem Planetenweg. Die Erde schrumpft auf eine 6,5 Millimeter kleine Kugel; die Sonne ist dagegen 70 Zentimeter groß.\nDer Planetenweg erstreckt sich von der Sonnen-Stele in der Goethe-Allee bis zum Bismarckturm, wo die Pluto-Stele zu finden ist. Pluto wurde am 26. August 2006 der Status als Planet aberkannt; Pluto ist seitdem nur noch ein \"Zwergplanet\".\nDer Planetenweg wurde initiiert vom Förderverein Planetarium Göttingen e.V.. Die Bronze-Stelen des Planentenwegs wurden durch Sponsorengelder finanziert und maßgeblich von Reinhold Wittig gestaltet. (Quelle: Wiki Göttingen)\n"
},
"Orientation": {
"value": 1,
"description": "top-left"
},
"SamplesPerPixel": {
"value": 3,
"description": 3
},
"XResolution": {
"value": 300,
"description": 300
},
"YResolution": {
"value": 300,
"description": 300
},
"ResolutionUnit": {
"value": 2,
"description": "inches"
},
"Software": {
"value": ["Adobe Photoshop CS5 Macintosh"],
"description": "Adobe Photoshop CS5 Macintosh"
},
"DateTime": {
"value": ["2012:08:29 14:51:10"],
"description": "2012:08:29 14:51:10"
},
"Artist": {
"value": ["Bernd Beuermann"],
"description": "Bernd Beuermann"
},
"Copyright": {
"value": ["Bernd Beuermann"],
"description": "Bernd Beuermann"
},
"Exif IFD Pointer": {
"value": 1404,
"description": 1404
},
"ExifVersion": {
"value": [48, 50, 50, 49],
"description": "0221"
},
"ColorSpace": {
"value": 65535,
"description": "Uncalibrated"
},
"PixelXDimension": {
"value": 694,
"description": 694
},
"PixelYDimension": {
"value": 340,
"description": 340
}
},
"iptc": {
"Coded Character Set": {
"value": [27, 37, 71],
"description": "UTF-8"
},
"Record Version": {
"value": [0, 3],
"description": "3"
},
"Caption/Abstract": {
"value": [80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 32, 71, 195, 182, 116, 116, 105, 110, 103, 101, 110, 32, 83, 116, 97, 116, 105, 111, 110, 32, 83, 111, 110, 110, 101, 32, 83, 116, 97, 114, 116, 32, 100, 101, 115, 32, 87, 101, 103, 101, 115, 32, 105, 110, 32, 100, 101, 114, 32, 32, 71, 111, 101, 116, 104, 97, 108, 108, 101, 32, 68, 101, 114, 32, 80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 32, 105, 115, 116, 32, 101, 105, 110, 101, 32, 112, 111, 112, 117, 108, 195, 164, 114, 97, 115, 116, 114, 111, 110, 111, 109, 105, 115, 99, 104, 101, 32, 73, 110, 115, 116, 97, 108, 108, 97, 116, 105, 111, 110, 32, 105, 109, 32, 195, 182, 102, 102, 101, 110, 116, 108, 105, 99, 104, 101, 110, 32, 82, 97, 117, 109, 32, 105, 110, 32, 71, 195, 182, 116, 116, 105, 110, 103, 101, 110, 46, 32, 68, 101, 114, 32, 80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 32, 98, 101, 115, 116, 101, 104, 116, 32, 97, 117, 115, 32, 97, 117, 115, 32, 122, 101, 104, 110, 32, 66, 114, 111, 110, 122, 101, 115, 116, 101, 108, 101, 110, 44, 32, 100, 105, 101, 32, 100, 105, 101, 32, 83, 111, 110, 110, 101, 44, 32, 100, 105, 101, 32, 97, 99, 104, 116, 32, 34, 110, 111, 114, 109, 97, 108, 101, 110, 34, 32, 80, 108, 97, 110, 101, 110, 116, 101, 110, 32, 117, 110, 115, 101, 114, 101, 115, 32, 83, 111, 110, 110, 101, 110, 115, 121, 115, 116, 101, 109, 115, 32, 115, 111, 119, 105, 101, 32, 80, 108, 117, 116, 111, 32, 122, 101, 105, 103, 101, 110, 46, 32, 65, 117, 102, 32, 100, 101, 110, 32, 66, 114, 111, 110, 122, 101, 115, 116, 101, 108, 101, 110, 32, 102, 105, 110, 100, 101, 110, 32, 115, 105, 99, 104, 32, 106, 101, 119, 101, 105, 108, 115, 32, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 101, 110, 32, 122, 117, 32, 100, 101, 110, 32, 80, 108, 97, 110, 101, 116, 101, 110, 46, 32, 68, 101, 114, 32, 71, 195, 182, 116, 116, 105, 110, 103, 101, 114, 32, 80, 108, 97, 110, 101, 110, 116, 119, 101, 103, 32, 105, 115, 116, 32, 105, 109, 32, 77, 97, 195, 159, 115, 116, 97, 98, 32, 49, 58, 50, 32, 77, 105, 108, 108, 105, 97, 114, 100, 101, 110, 32, 103, 101, 104, 97, 108, 116, 101, 110, 46, 32, 90, 119, 101, 105, 32, 77, 105, 108, 108, 97, 114, 100, 101, 110, 32, 75, 105, 108, 111, 109, 101, 116, 101, 114, 32, 105, 109, 32, 87, 101, 108, 116, 97, 108, 108, 32, 101, 110, 116, 115, 112, 114, 101, 99, 104, 101, 110, 32, 100, 97, 109, 105, 116, 32, 101, 105, 110, 101, 109, 32, 75, 105, 108, 111, 109, 101, 116, 101, 114, 32, 97, 117, 102, 32, 100, 101, 109, 32, 80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 46, 32, 68, 105, 101, 32, 69, 114, 100, 101, 32, 115, 99, 104, 114, 117, 109, 112, 102, 116, 32, 97, 117, 102, 32, 101, 105, 110, 101, 32, 54, 44, 53, 32, 77, 105, 108, 108, 105, 109, 101, 116, 101, 114, 32, 107, 108, 101, 105, 110, 101, 32, 75, 117, 103, 101, 108, 59, 32, 100, 105, 101, 32, 83, 111, 110, 110, 101, 32, 105, 115, 116, 32, 100, 97, 103, 101, 103, 101, 110, 32, 55, 48, 32, 90, 101, 110, 116, 105, 109, 101, 116, 101, 114, 32, 103, 114, 111, 195, 159, 46, 13, 68, 101, 114, 32, 80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 32, 101, 114, 115, 116, 114, 101, 99, 107, 116, 32, 115, 105, 99, 104, 32, 118, 111, 110, 32, 100, 101, 114, 32, 83, 111, 110, 110, 101, 110, 45, 83, 116, 101, 108, 101, 32, 105, 110, 32, 100, 101, 114, 32, 71, 111, 101, 116, 104, 101, 45, 65, 108, 108, 101, 101, 32, 98, 105, 115, 32, 122, 117, 109, 32, 66, 105, 115, 109, 97, 114, 99, 107, 116, 117, 114, 109, 44, 32, 119, 111, 32, 100, 105, 101, 32, 80, 108, 117, 116, 111, 45, 83, 116, 101, 108, 101, 32, 122, 117, 32, 102, 105, 110, 100, 101, 110, 32, 105, 115, 116, 46, 32, 80, 108, 117, 116, 111, 32, 119, 117, 114, 100, 101, 32, 97, 109, 32, 50, 54, 46, 32, 65, 117, 103, 117, 115, 116, 32, 50, 48, 48, 54, 32, 100, 101, 114, 32, 83, 116, 97, 116, 117, 115, 32, 97, 108, 115, 32, 80, 108, 97, 110, 101, 116, 32, 97, 98, 101, 114, 107, 97, 110, 110, 116, 59, 32, 80, 108, 117, 116, 111, 32, 105, 115, 116, 32, 115, 101, 105, 116, 100, 101, 109, 32, 110, 117, 114, 32, 110, 111, 99, 104, 32, 101, 105, 110, 32, 34, 90, 119, 101, 114, 103, 112, 108, 97, 110, 101, 116, 34, 46, 13, 68, 101, 114, 32, 80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 32, 119, 117, 114, 100, 101, 32, 105, 110, 105, 116, 105, 105, 101, 114, 116, 32, 118, 111, 109, 32, 70, 195, 182, 114, 100, 101, 114, 118, 101, 114, 101, 105, 110, 32, 80, 108, 97, 110, 101, 116, 97, 114, 105, 117, 109, 32, 71, 195, 182, 116, 116, 105, 110, 103, 101, 110, 32, 101, 46, 86, 46, 46, 32, 68, 105, 101, 32, 66, 114, 111, 110, 122, 101, 45, 83, 116, 101, 108, 101, 110, 32, 100, 101, 115, 32, 80, 108, 97, 110, 101, 110, 116, 101, 110, 119, 101, 103, 115, 32, 119, 117, 114, 100, 101, 110, 32, 100, 117, 114, 99, 104, 32, 83, 112, 111, 110, 115, 111, 114, 101, 110, 103, 101, 108, 100, 101, 114, 32, 102, 105, 110, 97, 110, 122, 105, 101, 114, 116, 32, 117, 110, 100, 32, 109, 97, 195, 159, 103, 101, 98, 108, 105, 99, 104, 32, 118, 111, 110, 32, 82, 101, 105, 110, 104, 111, 108, 100, 32, 87, 105, 116, 116, 105, 103, 32, 103, 101, 115, 116, 97, 108, 116, 101, 116, 46, 32, 40, 81, 117, 101, 108, 108, 101, 58, 32, 87, 105, 107, 105, 32, 71, 195, 182, 116, 116, 105, 110, 103, 101, 110, 41, 13],
"description": "Planetenweg Göttingen Station Sonne Start des Weges in der Goethalle Der Planetenweg ist eine populärastronomische Installation im öffentlichen Raum in Göttingen. Der Planetenweg besteht aus aus zehn Bronzestelen, die die Sonne, die acht \"normalen\" Planenten unseres Sonnensystems sowie Pluto zeigen. Auf den Bronzestelen finden sich jeweils Informationen zu den Planeten. Der Göttinger Planentweg ist im Ma�stab 1:2 Milliarden gehalten. Zwei Millarden Kilometer im Weltall entsprechen damit einem Kilometer auf dem Planetenweg. Die Erde schrumpft auf eine 6,5 Millimeter kleine Kugel; die Sonne ist dagegen 70 Zentimeter gro�.\rDer Planetenweg erstreckt sich von der Sonnen-Stele in der Goethe-Allee bis zum Bismarckturm, wo die Pluto-Stele zu finden ist. Pluto wurde am 26. August 2006 der Status als Planet aberkannt; Pluto ist seitdem nur noch ein \"Zwergplanet\".\rDer Planetenweg wurde initiiert vom Förderverein Planetarium Göttingen e.V.. Die Bronze-Stelen des Planentenwegs wurden durch Sponsorengelder finanziert und ma�geblich von Reinhold Wittig gestaltet. (Quelle: Wiki Göttingen)\r"
},
"Headline": {
"value": [80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 32, 71, 195, 182, 116, 116, 105, 110, 103, 101, 110, 32, 83, 116, 97, 114, 116, 32, 83, 116, 97, 116, 105, 111, 110, 32, 83, 111, 110, 110, 101],
"description": "Planetenweg Göttingen Start Station Sonne"
},
"By-line": {
"value": [66, 101, 114, 110, 100, 32, 66, 101, 117, 101, 114, 109, 97, 110, 110],
"description": "Bernd Beuermann"
},
"Credit": {
"value": [101, 117, 114, 111, 112, 105, 120, 101, 108, 47, 66, 46, 66, 101, 117, 101, 114, 109, 97, 110, 110],
"description": "europixel/B.Beuermann"
},
"Source": {
"value": [101, 117, 114, 111, 112, 105, 120, 101, 108, 46, 101, 117],
"description": "europixel.eu"
},
"Object Name": {
"value": [80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103, 32, 71, 195, 182, 116, 116, 105, 110, 103, 101, 110, 32, 83, 116, 97, 114, 116, 32, 83, 116, 97, 116, 105, 111, 110, 32, 83, 111, 110, 110, 101],
"description": "Planetenweg Göttingen Start Station Sonne"
},
"Date Created": {
"value": [50, 48, 49, 50, 48, 56, 49, 55],
"description": "2012-08-17"
},
"Time Created": {
"value": [48, 55, 48, 52, 52, 53, 43, 48, 49, 48, 48],
"description": "07:04:45+01:00"
},
"City": {
"value": [71, 195, 182, 116, 116, 105, 110, 103, 101, 110],
"description": "Göttingen"
},
"Sub-location": {
"value": [71, 111, 101, 116, 104, 101, 45, 65, 108, 108, 101, 101],
"description": "Goethe-Allee"
},
"Province/State": {
"value": [78, 105, 101, 100, 101, 114, 115, 97, 99, 104, 115, 101, 110],
"description": "Niedersachsen"
},
"Country/Primary Location Name": {
"value": [68, 101, 117, 116, 115, 99, 104, 108, 97, 110, 100],
"description": "Deutschland"
},
"Country/Primary Location Code": {
"value": [68, 69, 85],
"description": "DEU"
},
"Keywords": [{
"value": [80, 108, 97, 110, 101, 116, 101, 110, 119, 101, 103],
"description": "Planetenweg"
}, {
"value": [65, 115, 116, 114, 111, 110, 111, 109, 105, 101],
"description": "Astronomie"
}, {
"value": [80, 108, 97, 110, 101, 116, 101, 110],
"description": "Planeten"
}, {
"value": [71, 195, 182, 116, 116, 105, 110, 103, 101, 110],
"description": "Göttingen"
}, {
"value": [87, 101, 103],
"description": "Weg"
}, {
"value": [87, 105, 115, 115, 101, 110],
"description": "Wissen"
}, {
"value": [66, 105, 108, 100, 117, 110, 103],
"description": "Bildung"
}, {
"value": [70, 114, 101, 105, 122, 101, 105, 116],
"description": "Freizeit"
}],
"Copyright Notice": {
"value": [66, 101, 114, 110, 100, 32, 66, 101, 117, 101, 114, 109, 97, 110, 110],
"description": "Bernd Beuermann"
},
"undefined-733": {
"value": [48, 58, 48, 58, 48, 58, 45, 48, 48, 48, 48, 49],
"description": [48, 58, 48, 58, 48, 58, 45, 48, 48, 48, 48, 49]
}
},
"xmp": {
"about": {
"value": "",
"attributes": {},
"description": ""
},
"ModifyDate": {
"value": "2012-08-29T14:51:10+02:00",
"attributes": {},
"description": "2012-08-29T14:51:10+02:00"
},
"MetadataDate": {
"value": "2012-08-29T14:51:10+02:00",
"attributes": {},
"description": "2012-08-29T14:51:10+02:00"
},
"Label": {
"value": "",
"attributes": {},
"description": ""
},
"Rating": {
"value": "100",
"attributes": {},
"description": "100"
},
"CreateDate": {
"value": "2012-08-16T12:57:16+02:00",
"attributes": {},
"description": "2012-08-16T12:57:16+02:00"
},
"format": {
"value": "image/jpeg",
"attributes": {},
"description": "image/jpeg"
},
"City": {
"value": "Göttingen",
"attributes": {},
"description": "Göttingen"
},
"State": {
"value": "Niedersachsen",
"attributes": {},
"description": "Niedersachsen"
},
"Country": {
"value": "Deutschland",
"attributes": {},
"description": "Deutschland"
},
"Credit": {
"value": "europixel/B.Beuermann",
"attributes": {},
"description": "europixel/B.Beuermann"
},
"Source": {
"value": "europixel.eu",
"attributes": {},
"description": "europixel.eu"
},
"Headline": {
"value": "Planetenweg Göttingen Start Station Sonne",
"attributes": {},
"description": "Planetenweg Göttingen Start Station Sonne"
},
"DateCreated": {
"value": "2012-08-17T07:04:45+01:00",
"attributes": {},
"description": "2012-08-17T07:04:45+01:00"
},
"LegacyIPTCDigest": {
"value": "0E6815C71DFE818EE54C713049899D30",
"attributes": {},
"description": "0E6815C71DFE818EE54C713049899D30"
},
"ColorMode": {
"value": "3",
"attributes": {},
"description": "3"
},
"InstanceID": {
"value": "xmp.iid:0A127F350920681197A5A601B1FCC622",
"attributes": {},
"description": "xmp.iid:0A127F350920681197A5A601B1FCC622"
},
"DocumentID": {
"value": "xmp.did:CA4D19C70A206811994C88E52234E22C",
"attributes": {},
"description": "xmp.did:CA4D19C70A206811994C88E52234E22C"
},
"OriginalDocumentID": {
"value": "xmp.did:CA4D19C70A206811994C88E52234E22C",
"attributes": {},
"description": "xmp.did:CA4D19C70A206811994C88E52234E22C"
},
"CountryCode": {
"value": "DEU",
"attributes": {},
"description": "DEU"
},
"Location": {
"value": "Goethe-Allee",
"attributes": {},
"description": "Goethe-Allee"
},
"Marked": {
"value": "True",
"attributes": {},
"description": "True"
},
"ColorClass": {
"value": "0",
"attributes": {},
"description": "0"
},
"Tagged": {
"value": "False",
"attributes": {},
"description": "False"
},
"Prefs": {
"value": "0:0:0:-00001",
"attributes": {},
"description": "0:0:0:-00001"
},
"PMVersion": {
"value": "PM5",
"attributes": {},
"description": "PM5"
},
"AlreadyApplied": {
"value": "True",
"attributes": {},
"description": "True"
},
"creator": {
"value": [{
"value": "Bernd Beuermann",
"attributes": {},
"description": "Bernd Beuermann"
}],
"attributes": {},
"description": "Bernd Beuermann"
},
"title": {
"value": [{
"value": "Planetenweg Göttingen Start Station Sonne",
"attributes": {
"lang": "x-default"
},
"description": "Planetenweg Göttingen Start Station Sonne"
}],
"attributes": {},
"description": "Planetenweg Göttingen Start Station Sonne"
},
"subject": {
"value": [{
"value": "Planetenweg",
"attributes": {},
"description": "Planetenweg"
}, {
"value": "Astronomie",
"attributes": {},
"description": "Astronomie"
}, {
"value": "Planeten",
"attributes": {},
"description": "Planeten"
}, {
"value": "Göttingen",
"attributes": {},
"description": "Göttingen"
}, {
"value": "Weg",
"attributes": {},
"description": "Weg"
}, {
"value": "Wissen",
"attributes": {},
"description": "Wissen"
}, {
"value": "Bildung",
"attributes": {},
"description": "Bildung"
}, {
"value": "Freizeit",
"attributes": {},
"description": "Freizeit"
}],
"attributes": {},
"description": "Planetenweg, Astronomie, Planeten, Göttingen, Weg, Wissen, Bildung, Freizeit"
},
"rights": {
"value": [{
"value": "Bernd Beuermann",
"attributes": {
"lang": "x-default"
},
"description": "Bernd Beuermann"
}],
"attributes": {},
"description": "Bernd Beuermann"
},
"description": {
"value": [{
"value": "Planetenweg Göttingen Station Sonne Start des Weges in der Goethalle Der Planetenweg ist eine populärastronomische Installation im öffentlichen Raum in Göttingen. Der Planetenweg besteht aus aus zehn Bronzestelen, die die Sonne, die acht \"normalen\" Planenten unseres Sonnensystems sowie Pluto zeigen. Auf den Bronzestelen finden sich jeweils Informationen zu den Planeten. Der Göttinger Planentweg ist im Ma�stab 1:2 Milliarden gehalten. Zwei Millarden Kilometer im Weltall entsprechen damit einem Kilometer auf dem Planetenweg. Die Erde schrumpft auf eine 6,5 Millimeter kleine Kugel; die Sonne ist dagegen 70 Zentimeter gro�.\nDer Planetenweg erstreckt sich von der Sonnen-Stele in der Goethe-Allee bis zum Bismarckturm, wo die Pluto-Stele zu finden ist. Pluto wurde am 26. August 2006 der Status als Planet aberkannt; Pluto ist seitdem nur noch ein \"Zwergplanet\".\nDer Planetenweg wurde initiiert vom Förderverein Planetarium Göttingen e.V.. Die Bronze-Stelen des Planentenwegs wurden durch Sponsorengelder finanziert und ma�geblich von Reinhold Wittig gestaltet. (Quelle: Wiki Göttingen)\n",
"attributes": {
"lang": "x-default"
},
"description": "Planetenweg Göttingen Station Sonne Start des Weges in der Goethalle Der Planetenweg ist eine populärastronomische Installation im öffentlichen Raum in Göttingen. Der Planetenweg besteht aus aus zehn Bronzestelen, die die Sonne, die acht \"normalen\" Planenten unseres Sonnensystems sowie Pluto zeigen. Auf den Bronzestelen finden sich jeweils Informationen zu den Planeten. Der Göttinger Planentweg ist im Maßstab 1:2 Milliarden gehalten. Zwei Millarden Kilometer im Weltall entsprechen damit einem Kilometer auf dem Planetenweg. Die Erde schrumpft auf eine 6,5 Millimeter kleine Kugel; die Sonne ist dagegen 70 Zentimeter groß.\nDer Planetenweg erstreckt sich von der Sonnen-Stele in der Goethe-Allee bis zum Bismarckturm, wo die Pluto-Stele zu finden ist. Pluto wurde am 26. August 2006 der Status als Planet aberkannt; Pluto ist seitdem nur noch ein \"Zwergplanet\".\nDer Planetenweg wurde initiiert vom Förderverein Planetarium Göttingen e.V.. Die Bronze-Stelen des Planentenwegs wurden durch Sponsorengelder finanziert und maßgeblich von Reinhold Wittig gestaltet. (Quelle: Wiki Göttingen)\n"
}],
"attributes": {},
"description": "Planetenweg Göttingen Station Sonne Start des Weges in der Goethalle Der Planetenweg ist eine populärastronomische Installation im öffentlichen Raum in Göttingen. Der Planetenweg besteht aus aus zehn Bronzestelen, die die Sonne, die acht \"normalen\" Planenten unseres Sonnensystems sowie Pluto zeigen. Auf den Bronzestelen finden sich jeweils Informationen zu den Planeten. Der Göttinger Planentweg ist im Maßstab 1:2 Milliarden gehalten. Zwei Millarden Kilometer im Weltall entsprechen damit einem Kilometer auf dem Planetenweg. Die Erde schrumpft auf eine 6,5 Millimeter kleine Kugel; die Sonne ist dagegen 70 Zentimeter groß.\nDer Planetenweg erstreckt sich von der Sonnen-Stele in der Goethe-Allee bis zum Bismarckturm, wo die Pluto-Stele zu finden ist. Pluto wurde am 26. August 2006 der Status als Planet aberkannt; Pluto ist seitdem nur noch ein \"Zwergplanet\".\nDer Planetenweg wurde initiiert vom Förderverein Planetarium Göttingen e.V.. Die Bronze-Stelen des Planentenwegs wurden durch Sponsorengelder finanziert und maßgeblich von Reinhold Wittig gestaltet. (Quelle: Wiki Göttingen)\n"
},
"History": {
"value": [{
"value": {},
"attributes": {
"action": "saved",
"instanceID": "xmp.iid:CA4D19C70A206811994C88E52234E22C",
"when": "2012-08-16T15:17:58+02:00",
"softwareAgent": "Adobe Photoshop CS5 Macintosh",
"changed": "/"
},
"description": ""
}, {
"value": {},
"attributes": {
"action": "saved",
"instanceID": "xmp.iid:09127F350920681197A5A601B1FCC622",
"when": "2012-08-29T14:51:10+02:00",
"softwareAgent": "Adobe Photoshop CS5 Macintosh",
"changed": "/"
},
"description": ""
}, {
"value": {},
"attributes": {
"action": "saved",
"instanceID": "xmp.iid:0A127F350920681197A5A601B1FCC622",
"when": "2012-08-29T14:51:10+02:00",
"softwareAgent": "Adobe Photoshop CS5 Macintosh",
"changed": "/"
},
"description": ""
}],
"attributes": {},
"description": ", , "
},
"CreatorContactInfo": {
"value": {
"CiAdrExtadr": {
"value": "Bernd Beuermann, Garbenstr. 32, 37081 Göttingen",
"attributes": {},
"description": "Bernd Beuermann, Garbenstr. 32, 37081 Göttingen"
},
"CiAdrCity": {
"value": "Göttingen",
"attributes": {},
"description": "Göttingen"
},
"CiAdrRegion": {
"value": "Niedersachsen",
"attributes": {},
"description": "Niedersachsen"
},
"CiAdrPcode": {
"value": "D-37081",
"attributes": {},
"description": "D-37081"
},
"CiAdrCtry": {
"value": "Deutschland",
"attributes": {},
"description": "Deutschland"
},
"CiEmailWork": {
"value": "[email protected]",
"attributes": {},
"description": "[email protected]"
},
"CiUrlWork": {
"value": "www.beuermann.de",
"attributes": {},
"description": "www.beuermann.de"
}
},
"attributes": {},
"description": "CreatorAddress: Bernd Beuermann, Garbenstr. 32, 37081 Göttingen; CreatorCity: Göttingen; CreatorRegion: Niedersachsen; CreatorPostalCode: D-37081; CreatorCountry: Deutschland; CreatorWorkEmail: [email protected]; CreatorWorkUrl: www.beuermann.de"
}
}
}
I've extended/improved ExifReader's IPTC tag support in fork https://github.com/SaintFlipper/ExifReader, as we needed it for our project (I'm working in the news picture industry).
These seem like generally useful extensions if you want to merge them into the master branch.
So it decodes text by honouring a specified "coded character set" encoding signal (1:90) if TextEncoder is available (native or polyfill)
This allows ExifReader to handle many of the character sets listed in the IPTC IIM specification Appendix C, most usefully the iso-8859-x charsets and utf8.
Note that IPTC IIM v3 specification states that in the absence of a coded character set (1:90) dataset the application should assume ISO 646 IRV (aka ASCII). In practice many
recent implementations assume UTF8, but that's an informal and non-standard usage.
So that the IPTC dataset (aka field number) is available through tag.id in addition to the descriptive label in tag.description.
This is so an application can extract specific fields of interest from the IPTC tag list using the official dataset ID (eg. headline = 2:105 = 617) rather than
the English language description (which presumably might change).
Extending the set of supported datasets to include records 1 and 7, so the application has access to fields such as destination, service ID, and product ID.
Added further JPEG marker IDs to image-header.js#isAppMarker(), allowing the parser to iterate over segments such as SOFn and COMMENT which occur before other segments of interest (APP13, EXIF, XMP).
Previously the parseAppMarkers loop would break out at that point so the ability to extract EXIF/XMP/IPTC metadata was dependent on the segment order.
Some unnamed Tags
https://dumpz.org/aHgHtZ3X6TyE
undefined-42034: description: (4) [18, 200, 3.5, 6.3] id: 42034 value: (4) [18, 200, 3.5, 6.3] __proto__: Object undefined-42036: description: ["18-200mm F3.5-6.3"] id: 42036 value: ["18-200mm F3.5-6.3"] __proto__: Object
can you name it?
like
LensSpecification: [ 4.15, 4.15, 2.2, 2.2 ],
LensMake: 'Apple',
LensModel: 'iPhone 6 back camera 4.15mm f/2.2'
thx
ExifReader returns Orientation of value 6 for picture https://user-images.githubusercontent.com/26544966/30562727-cfe7e2f2-9cbf-11e7-82f6-dbb969e79380.jpg. Exiftool returns "Horizontal (normal)", also as https://www.thexifer.net/. Also exiftran doesn't rotate the picture. Just http://metapicz.com shows two orientations - one from EXIF as "Horizontal (normal)" and other from XMP as "Rotate 90 CW".
Maybe the metadata is simply wrong but ExifReader should return 1 to be compatibile with probably most of the other tools.
Hi
I'm trying to use this library to extract EXIF data from photos uploaded via InkFilePicker Link.
Is it possible to read the exif data from a remote image url?
I want to read the EXIF (specifically XMP) data of files being written into AWS S3. When I use the following (after reading from s3 getObject call);
var exifData = exif.load(response.Body, {expanded: true});
listTags(exifData);
function listTags(tags) {
for (const name in tags) {
console.log(`${name}: ${tags[name].description}`);
}
}
I get the following message:
file: undefined
exif: undefined
xmp: undefined
But the same works fine in browser upload (fs reader). How can I make this work with raw buffer in AWS?
Hello! I was wondering if you could support an option
to bypass the following thrown error:
if (!foundMetaData) {
throw new Error('No Exif data');
}
Something like:
ExifReader.load(buffer, { silent: true });
I need this because I need to differentiate between the case of an image not having EXIF information and an unsupported image format (like .png). In my use case, I would like to actually not throw an error and proceed as normal if no EXIF information was found.
Happy to write up a PR if needed. Thanks!
Hello,
First, thanks for your useful script.
I'm using this piece of script to get IPTC tags of a file :
`var reader = new FileReader();
reader.onload = function (evt) {
try {
var exif = new ExifReader();
// Parse the Exif tags.
exif.load(evt.target.result);
// Output the tags on the page.
tags = exif.getAllTags();
}
catch (error) {
alert(error);
}
};
reader.readAsArrayBuffer(file);`
It works well.
Then I d' like to get and use tags's variable outside this piece of script, further in my script. But if I write console.log(tags) after the last line (after reader.readAsArrayBuffer(file);), variable is empty.
Could you please help me to solve this problem ?
Thansk a lot,
JG
When sending coordinates to Google or Bing maps using a decimal latitude/longitude, they expect negative numbers if the coordinate is West or South. I'm working around this by testing the GPSLatitudeRef and GPSLongitudeRef and multiplying the description by -1 if the array returned by the Ref contains "W" or "S".
sign = exifReader.getTagValue('GPSLatitudeRef').indexOf('N') === -1 ? -1 : 1;
This would also work: sign = exifReader.getTagValue('GPSLatitudeRef').indexOf('N') || 1
Hello
Can you make it available for angular 7 and above ?
thanks
Suggestion: IPTC and XMP Support for TIFF images.
It seems EXIF only is supported with TIFF images.
I have a jpg image where I can see some tags via exiftool (see below),
but when running the exif-reader example I'm getting a message complainign that there is no exif data
message: "No Exif data"
name: "MetadataMissingError"
How can I extract the image with, height and file modification time in such case?
Thanks
exiftool default_image.jpg
ExifTool Version Number : 10.80
File Name : default_image.jpg
Directory : /home/sh3d
File Size : 829 bytes
File Modification Date/Time : 2019:02:12 23:57:36-08:00
File Access Date/Time : 2019:02:21 20:49:34-08:00
File Inode Change Date/Time : 2019:02:12 23:57:36-08:00
File Permissions : rw-rw-r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : None
X Resolution : 1
Y Resolution : 1
Image Width : 300
Image Height : 300
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 300x300
Megapixels : 0.090
It would be great to be able to read Flir EXIF data from images - I really would like to be able to extract the embedded Flir images along with their info like it can be done with Phil Harvey's Exiftool.
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/FLIR.html
I would be interested in raw support particularly NEF. You probably already know that, but there is Phil Harvey's exiftool (written in pearl) that already can do that. Wouldn't it possible to copy over from there?
Are there plans to support reading exif tags from png image?
Thanks,
Avner
Hello,
I've a problem while reading Webstatement and Marked Tags on some pictures.
These two pictures contains these two tags (Photoshop shows them).
But ExifReader gets these two tags of the second picture only, not the first one.
First image : http://hanslucas.com/test/first.jpg (tags not OK)
Second image : http://hanslucas.com/test/second.jpg (tags OK)
I can't figure why...
Do you have an idea ?
Thanks a lot,
JG
First of all, thanks for this tool! It's great stuff and a pleasure to use!
In the readme's tips, you mention one should only read part of a file for efficiency and point to the examples for how to do this. However, you actually read the entire file in the Node example. Wouldn't it make sense to replace fs.readFile
with fs.read
there?
EXIF data is not parsed for specific JPEG files. I am trying to extract color profile info and used the files from here: http://regex.info/blog/photo-tech/color-spaces-page2
For example this image: http://regex.info/i/cs/Momiji-sRGB-yes.jpg
exiftool.exe .\Momiji-sRGB-yes.jpg
ExifTool Version Number : 11.65
File Name : Momiji-sRGB-yes.jpg
Directory : .
File Size : 46 kB
File Modification Date/Time : 2019:09:30 09:55:48+02:00
File Access Date/Time : 2019:09:30 09:55:48+02:00
File Creation Date/Time : 2019:09:30 09:55:47+02:00
File Permissions : rw-rw-rw-
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.02
Resolution Unit : None
X Resolution : 100
Y Resolution : 100
Quality : 30%
Profile CMM Type : Linotronic
Profile Version : 2.1.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 1998:02:09 06:49:00
Profile File Signature : acsp
Primary Platform : Microsoft Corporation
CMM Flags : Not Embedded, Independent
Device Manufacturer : Hewlett-Packard
Device Model : sRGB
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : Hewlett-Packard
Profile ID : 0
Profile Copyright : Copyright (c) 1998 Hewlett-Packard Company
Profile Description : sRGB IEC61966-2.1
Media White Point : 0.95045 1 1.08905
Media Black Point : 0 0 0
Red Matrix Column : 0.43607 0.22249 0.01392
Green Matrix Column : 0.38515 0.71687 0.09708
Blue Matrix Column : 0.14307 0.06061 0.7141
Device Mfg Desc : IEC http://www.iec.ch
Device Model Desc : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant : 19.6445 20.3718 16.8089
Viewing Cond Surround : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type : D50
Luminance : 76.03647 80 87.12462
Measurement Observer : CIE 1931
Measurement Backing : 0 0 0
Measurement Geometry : Unknown
Measurement Flare : 0.999%
Measurement Illuminant : D65
Technology : Cathode Ray Tube Display
Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
DCT Encode Version : 100
APP14 Flags 0 : [14], Encoded with Blend=1 downsampling
APP14 Flags 1 : (none)
Color Transform : YCbCr
Image Width : 600
Image Height : 450
Encoding Process : Progressive DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 600x450
Megapixels : 0.270
What I get from ExifReader either in my code or by using examples/global/index.html:
Bits Per Sample 8
Image Height 450px
Image Width 600px
Color Components 3
Subsampling YCbCr4:2:0 (2 2)
Quickly checking source code, I see that fileDataOffset
is set but other fields ( tiffHeaderOffset
,
iptcDataOffset
, ...) are not.
Matthias, I really like your ExifReader, good work!
I'm currently setting up some kind of online travel stories with no cms/server behind, so it can be served from any webspace or dropbox/google drive. I started using your ExifReader on the client side to enhance the picture descriptions with metadata like exposure, iso, ... . Next step would be to automatically label the pictures with IPTC Headline or other IPTC fields such as IPTC Creator.
I did some research on this topic finding http://code.flickr.net/2012/06/01/parsing-exif-client-side-using-javascript-2/ and http://stackoverflow.com/questions/5833026/extract-iptc-information-from-jpeg-using-javascript but I did not find any js-library to embed for reading EXIF+IPTC.
Do you have any plans to continue/expand ExifReader?
Cheers,
Markus
exif.js is no longer maintained and I encountered a js bug on exif.js line 741 because n is not declared.
Can you switch to ExifReader?
I've added ExifReader to an Angular 7 project (not CLI, building with webpack), and am getting the following error when I build.
ERROR in app.js from UglifyJs
Unexpected token: punc (,) [./node_modules/angular-router-loader/src!./node_modules/exifreader/src/byte-order.js:9,0][app.js:46584,14]
I've tried a number of recommended solutions, changing from ES5 to ES6 target in the tsconfig file, removing Uglify from the webpack config, which strangely enough doesn't stop that same error from being reported.
I'm importing like this:
import * as ExifReader from 'exifreader';
Then making use of it like this:
getIPTCData(file: Blob, key) {
const fileReader: FileReader = new FileReader();
fileReader.addEventListener('load', fileReaderEvent => {
const tags = ExifReader.load(fileReader.result as ArrayBuffer, { expanded: true });
console.log("tags: ", tags);
});
fileReader.readAsArrayBuffer(file);
}
I'm not sure what the issue is, or how to resolve it.
Update: The resulting build does run and perform as expected, but I'm always hesitant to leave build errors unresolved.
Suggestion: Rational fields (ex: ExposureTime) should provide their raw value as a numerator/denominator pair. That would be very useful for displaying without rounding errors/loss of precision.
When I tried to Install ExifReader using npm install exifreader
it kept asking me fop webpack CLI and eventually failed as said Yes to install.
How to reproduce
npm install exifreader
> [email protected] postinstall /Users/Workspace/test/node_modules/exifreader
> npm run build
> [email protected] build /Users/Workspace/test/node_modules/exifreader
> webpack
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): yes
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
+ [email protected]
added 204 packages from 129 contributors in 25.605s
1 package is looking for funding
run `npm fund` for details
Error: Cannot find module 'webpack-cli'
Require stack:
-/Users/Workspace/testnode_modules/webpack/bin/webpack.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:981:15)
at Function.Module._load (internal/modules/cjs/loader.js:863:27)
at Module.require (internal/modules/cjs/loader.js:1043:19)
at require (internal/modules/cjs/helpers.js:77:18)
at /Users/Workspace/test/node_modules/webpack/bin/webpack.js:143:5
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/Workspace/test/webpack/bin/webpack.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
As my project was built with Create-Reat-App, why do I need to install webpack again?? I never have seen this kind of issue with any other libraries. Am I missing anything here?
Hi there! Firstly, thanks so much for making this library – it's definitely my favorite of the available EXIF readers published to npm.
I'm hoping to use it in a project where the LGPL license would be a bit problematic. While I could probably full it from a CDN to constitute a "dynamic link" and avoid the copy-left requirements, I'd much rather pull it into my webpack bundle.
Would you consider relicensing this under something more permissive, such as the MIT license?
Thanks again!
Hi,
I can't read IPTC tags in this image, only EXIF tags are read:
http://hanslucas.com/ROJ07004MC022-06LITTLE.jpg
But I see them in Photoshop for example.
Can you help me to understand what's going wrong ?
Thanks a lot,
JG
Hi,
I found a potential bug within the XMP tags:
I try to read the face regions that lightroom generate to a photo (in nodejs):
attribute mwg-rs:Name
within ExifReader.load(data).Regions.value.RegionList.value[i].value['rdf:Description'].attributes['mwg-rs:Name']
The name should be special_chars űáéúőóüío?._:
but instead I get: special_chars űáéúÅ�óüÃo?._:
Do you have any recommended solution for fixing it?
I'm using the following jpg for testing:
Thanks!
Best,
Patrik
p.s.: really nice lib, thanks for the great work!. The only things that bothers me that with nodejs it has dependencies like jdataview
that is needed to be somewhat 'mock'.
(And also Typescript type definitions would be nice :) )
When running ExifReader through YUI minification, I get errors due to the use of the reserved words 'char' and 'byte'. I fixed this locally by replacing them with 'aChar' and 'aByte'.
Hi Mattias,
I have some difficulties to get some tags from some images (but not all).
For example, I try with this image : http://juliengautier.net/HL_ENASSY_VELEDISCAMPIA_8.jpg
Using ExifReader, I can't get Subject Code, neither Country Code, neither Marked status, neither WebStatement. But these tags are present in the file, and both Photoshop ans ExifTool can read them.
This problem doesn't happen with all files. For example, Exif Reader reads everything correctly in this other file : http://juliengautier.net/TEST_COPYRIGHT_PROTEGE.jpg
I can't understand why.
Thanks for your help,
JG
If I understand correctly if you add a
"files": [
"dist/exif-reader.js",
"dist/exif-reader.js.map"
],
To package.json then when installing this a dependency all the examples would stop being included in other projects.
I noticed all the images from this library were in my electron project when did a search for .jpg in the root of my project to find my own images and all of the examples in this project showed up.
Hi,
I'm trying to use your library but it cannot find any exif in my pictures. After a little debug I found that is because the function ExifReader.prototype._parseAppMarkers doesn't find the APP1 marker.
A very quick and dirty fix consist in adding the following lines inside the last else
appMarkerPosition += 1
continue
instead the break statement.
But since I know almost nothing about exif metadata I'm almost sure this is not a good solution.
I attach here an example image, but as far I noticed the main problem is that the APP1 marker is not always in the same position (I can send you a lot of images to test if you want).
Thank you
Lorenzo
Hello friend 👋
First, thank you for your hard work on ExifReader
; I've been looking at a bunch of different exif parsing libs and this is definitely my favorite (penetrable source code, simple API) so, bravo!
my problem: I'm looking to pull xmp off of some imagery captured with various DJI drones, but while traversing the document it's getting to a node with a value
that's a string (specifically, a newline followed by two spaces), and while trying to parse its children, hasNestedSimpleRdfDescription
gets passed that string and barfs doing deep property checks on it.
my question: I'm wondering if my issue is an actual bug with ExifReader
or if images like this one just have malformed xml? (I'm an xml newbie)
I have to make this work either way so I'm going to fork for now and add some error handling for this case, but if this isn't just DJI writing their xml with their feet I can open a PR for the additions
Cheers!
How to reproduce
What I expected would happen:
I was expecting that the GPSLatitude and GPSLongitude values returned would be the final numbers but one has to also look at their Refs and add a "-" sign if Lat has "S" value or LongitudeRef has "W" value.
What really happened:
I just got the raw coordinates and had to handle the signs on my own. This is not a biggie but for someone who has no idea about this the results did not make any sense especially for something as easy as adding a sign to the GPSLat or Long strings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.