Project

General

Profile

exiv2node issue with PhaseOne IIQ files

Added by Michael Estigoy over 4 years ago

I'm building an electron app and am working with Phase One IIQ images.

From the command line, extracting specific exif data works fine using exiv2 ... e.g. 'exiv2 -px -g GPSLatitude SkyIMD_20692.IIQ'
response: 'Xmp.exif.GPSLatitude XmpText 13 37,23.716896N'

Using node.js-electron-npm install, the getImageTags() function fails to do anything and I am unable to parse any exif data. I am following the examples here/GitHub

Image file is here: https://www.dropbox.com/s/vaaduxlr4u07zgo/SkyIMD_20692.IIQ?dl=0

If I run the same code on a group of JPG images from a Canon camera, everything is fine. If I run the same code on IIQ images converted to JPG's, everything is fine.

The issue is: I can use the command line to use exiv2 to retrieve specific exif tags, but not exiv2node to do the same.

Any help would be appreciated.

thanks.


Replies (10)

RE: exiv2node issue with PhaseOne IIQ files - Added by Robin Mills over 4 years ago

Michael

37.23N. Sounds like San Jose to me!

I don't have anything solid to say about this as I know nothing about exiv2node. This sounds like a bug in exiv2node code and not exiv2. You could raise an issue with them on GitHub: https://github.com/dberesford/exiv2node/issues

If no data is being returned from exiv2node, there are a couple of possibilities:
1) exiv2node isn't passing the pathname correctly to Exiv2
The most likely reason that node isn't passing the pathname is a unicode conversion error. I believe strings in JavaScript are unicode and should be converted to UTF8 when passed to Exiv2. You could instrument Exiv2::ImageFactory::Open() to see what's being passed from the node environment to the library.

2) exiv2node hasn't serialised the data correctly when copying it from Exiv2 into node objects or arrays or whatever is being used.
If the files have been correctly opened, you'll have to read the node2exiv2 code to see how the data is handled.

RE: exiv2node issue with PhaseOne IIQ files - Added by Robin Mills over 4 years ago

I've had another thought. There is a sample application exiv2json which serialises metadata into JSON. The current version is read-only. As an alternative to node2exiv2, you may be able to execute that application to retrieve the metadata.

RE: exiv2node issue with PhaseOne IIQ files - Added by Robin Mills over 4 years ago

One third thought. The code involve in getImageTags() is discussed here: https://github.com/dberesford/exiv2node/pull/27

I'm suspicious about UNICODE/UTF8 conversion of thread_data->fileName Perhaps that works OK on Windows and not on Linux (or something like that).

RE: exiv2node issue with PhaseOne IIQ files - Added by Michael Estigoy over 4 years ago

Wow, thanks for all three replies. I will dive back into this project on the weekend and also post on GitHub.

Yes, San Jose, specifically Great America Park. I'll be back in the air capturing more of the park this week.

Aerial of Gold Striker roller coaster - http://imgur.com/kNStKQy

Exiv2 is amazing by the way. I just found out about it not too long ago.

RE: exiv2node issue with PhaseOne IIQ files - Added by Robin Mills over 4 years ago

Thanks for your kind words about Exiv2. The credit of creating Exiv2 (and most of the code) goes to Andreas. I maintain the code and encourage people to use it.

Nice Photo at Great America. I lived in San Jose for 14 years and worked in the GPS business - that's why I recognised your Latitude. Longitude is 121W.

RE: exiv2node issue with PhaseOne IIQ files - Added by Damian Beresford over 4 years ago

Hi Robin,

I did some digging on this (https://github.com/dberesford/exiv2node/issues/51) and see that's it due to an unknown makernote (Phase One/iiq files don't look to be supported yet).

The command line exiv2 detects this, e.g.

```
$ exiv2 -pa test/images/sky.iiq |grep -i maker
Exif.Photo.MakerNote Undefined 116821540 (Binary value suppressed)
```

However from the value of the MakerNote returned from the c++ library is a seemingly endless stream as follows:

```
Exif.Photo.LightSource - 1
Exif.Photo.MakerNote - 73 73 73 73 67 119 97 82 76 136 246 6 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204 204........
```

So just looking for some help here, how would you recommend we detect the MakerNote is unsupported from the c++ api?

Thanks - and continued thanks for the development work on exiv2, it's a fantastic tool :-)

RE: exiv2node issue with PhaseOne IIQ files - Added by Robin Mills over 4 years ago

Yes, there's a MakeNote in there with 116 821 540 bytes (116mb tiff structure with 17000 tags). I think it's going to be quite an undertaking to support this MakerNote. The code to decode (and encode) MakerNotes is in tiffvisitor.cpp I don't believe there is an API to say "unsupported MakerNote". I don't have a solution and don't have time to look at what's involved because I have a promised a dot release in September. You could ask Phase One to develop Exiv2 support for their format. I'll be happy to work with them. If they write the patch (and test harness), I'll be happy to review and submit their code.

RE: exiv2node issue with PhaseOne IIQ files - Added by Michael Estigoy over 4 years ago

Thanks for the research Damian Beresford.

Robin, we are partners with Phase One. I'll send a note to their Chief Scientist, Dr. Yuri R., referencing this thread and request to support Exiv2.

RE: exiv2node issue with PhaseOne IIQ files - Added by Robin Mills over 4 years ago

Thanks. I'll be interested to hear their response.

    (1-10/10)