jl90
jl90

Reputation: 649

Importing metadata-extractor library not working in Processing

I am trying to extract the EXIF data from images in Processing by importing the metadata-extractor library by drewnoakes.com. I have tried the two possible methods to import a library but it still doesn't work at all.

What I've did:

1) Drag and drop the JAR file into my sketch and used the import statement import com.drew.*; but it is still complaining that the library doesn't exist.

2) Placed the JAR file in the Processing folder in My Documents folder and import library using the "Import Library..." option but when I select the library, no import statement is added automatically like the other libraries behave except for a blank line is inserted.

What do I have to do in order to import this library into the sketch?

Upvotes: 0

Views: 579

Answers (1)

kevinsa5
kevinsa5

Reputation: 3411

The .jar must be in the libraries subdirectory of your processing folder, not the processing folder itself. Make sure that the directory structure matches this (replace 'theLibrary' with your library name):

 Documents
       Processing
             your sketch folders
             libraries
                   theLibrary
                         examples
                         library
                               theLibrary.jar
                         reference
                         src

You may be able to omit the examples, reference, and src directories, but it would be safer to just make empty folders. Taken from the online help, which has more instructions if you are still stuck.

Edit: I installed it myself, here is the exact step sequence I took:

  • Downloaded metadata-extractor-2.6.4.zip from the website you posted

  • went to my sketchbook, went to libraries, created a folder called metadata_extractor with a subfolder called library

  • extracted metadata-extractor-2.6.4.jar and xmpcore.jar to my library folder

  • renamed metadata-extractor-2.6.4.jar to metadata_extractor.jar

  • opened Processing, went to sketch > import library and it was listed there

Upvotes: 1

Related Questions