samihabakri / D2S-Dataverse

TU-Wien Course
Other
0 stars 1 forks source link

As a repository operator, I want an extension that displays EXIF information on a JPEG file. #5

Open TomMiksa opened 5 years ago

HasanKhatib commented 5 years ago

tbd

TomMiksa commented 5 years ago

Dataverse has a list of integrations. This is because of their flexible API. I want you to write your own extension, that does something simple: when I upload an image to dataverse, then on its landing page there will be a button that I need to click to see the EXIF information on the picture.

http://guides.dataverse.org/en/latest/installation/external-tools.html

https://en.wikipedia.org/wiki/Exif https://en.wikipedia.org/wiki/ImageMagick

pdurbin commented 5 years ago

I would suggest opening an issue at https://github.com/QualitativeDataRepository/dataverse-previewers for EXIF support. I'm not sure how easy it would be to add but @qqmyers would probably know.

qqmyers commented 5 years ago

I think it would be possible to do this as a previewer - if I understand correctly, ImageMagick can pull exif out so a previewer would just need to call IM and then format the output for display. I think that would break the current model of serving previewers from github though - that works because the existing previewers are static content - just html and javascript. (If there's a javascript library to get EXIF, then hosting at github could still work...)

An alternative design might be to think about running EXIF extraction during ingest and storing the EXIF metadata in Dataverse. (ImageMagick already gets used to create thumbnails. And Tika may already be using it to get text from images if full-text indexing is enabled (I think that's true but haven't checked)). Dataverse could then display that metadata directly or rely on a static previewer that could query for that metadata and display it.

TomMiksa commented 5 years ago

Thanks for the suggestions. With this user story, the focus was more on how to write an extension that adds some "missing fucntionality" to Dataverse, rather than on EXIF and ImageMagick itself.

What I like about Dataverse, and what I would like to test/confirm, is the fact that it is not overloaded with features. Dataverse seems to be a good candidate for a core of a bigger system.

pdurbin commented 5 years ago

According to Atwood's Law, any application that can be written in JavaScript, will eventually be written in JavaScript. Reading EXIF information seems to be no exception.

I say this because I just cloned https://github.com/exif-js/exif-js to http://dev1.dataverse.org/exif-js/ and clicked on the picture of a former US president and a dog and saw this:

Screen Shot 2019-05-24 at 7 11 26 AM

I also tried the "Browse" button and uploaded a picture from https://dataverse.org/blog/forging-connections-dcm-2017 and it correctly identified the photographer as my friend and colleague @dliburd so I'm not too worried about smoke and mirrors. 😄

All this is to say that I believe you should be able to use Exif.js or a similar Javascript library to create an external tool to display EXIF information in the browser without changing any Dataverse code.

TaniaSchlatter commented 5 years ago

There are some privacy and security concerns with EXIF metadata. Installations choosing to enable display of EXIF information may need to consider what information is displayed and to whom, in light of GDPR, account creation terms of use, and data usage terms.