Aim of this project

05.10.09

Extract meta data from image.

Use XML Spring file in order to add/remove/customize meta data reading and viewing.

This project is not capable of writing meta data back into images.

This project greatly inspired from:

Launch

03.26.10

Before starting

This software need a Java virtual machine installed on your computer.

The minimal version needed is 6.

In order to download a Java VM you can go here.

If you want to check the current version running on your system, simply open a console window and type:

java -version

Java good version
If you get no answer then you have no Java, if the version is bellow 1.6 then you've an inappropriate version of Java for this software.

At last, starting

Keep in mind that this software is still in alpha, so a lot of code may change until first release.

Use mdt.Run class in order to start the project.

java -classpath MetaDataSpr.jar;commons-logging-1.1.1.jar;commons-math-2.0.jar;log4j-1.2.15.jar;org.springframework.asm-3.0.2.RELEASE.jar;org.springframework.beans-3.0.2.RELEASE.jar;org.springframework.context-3.0.2.RELEASE.jar;org.springframework.context.support-3.0.2.RELEASE.jar;org.springframework.core-3.0.2.RELEASE.jar;org.springframework.expression-3.0.2.RELEASE.jar mdt.Run -I:[InPutFileName] -O:[OutPutFileName] -M:[MODE] -GC -T:[X] -W

Jar files are separated by a ';' if you are under Windows, otherwise use ':' (if you are using a Unix like OS).

-I: for input file name. Mandatory, one value only. Can be a file or a directory but WITHOUT spaces.

-O: for ouput file name WITHOUT spaces. If present will put all result in it. If absent each file will create its own result file.

-T will activate multi-thread treatment. The X is the maximum number of thread allowed. Each image will be treated in one thread. Result on memory usage and processor time consumption may differ, regarding your system and the size of the images you want to analyze. Of course, this is only useful when you analyze more than one image. There is no maximum value, as an example, on 600 images I win 10% of time (3 seconds) using -T:32.

-GC will optimize memory usage but will slow down execution.

-W will not start as batch, will launch the main window. If this option is set, only -I will be accepted as an other option.


Where MODE can be one of the following:

  • XML: will return an XML file. Note that all values will be in CDDATA in order to avoid errors.
  • TXT: will return a simple TXT file.
  • HTML: will return an HTML file.
  • EXIF: will return a simple TXT file as similar as possible to the ExifTool project.

For examples, using batch mode:
MetaData SPR in BATCH mode

  • Will create a file c:/toto.xml as result
    java -classpath all jar -I:c:/toto.jpg -O:c:/toto.xml -M:XML
    java -classpath all jar -I:c:/toto.jpg -M:XML
    java -classpath all jar -I:c:/toto.jpg
  • Will create a file c:/toto.txt as result
    java -classpath all jar -I:c:/toto.jpg -O:c:/toto.txt -M:EXIF
    java -classpath all jar -I:c:/toto.jpg -M:EXIF
    java -classpath all jar -I:c:/toto.jpg -M:TXT
  • Will create a file c:/toto.html as result
    java -classpath all jar -I:c:/toto.jpg -O:c:/toto.html -M:HTML
  • Will create a file c:/temp/xx.txt for each JPG in c:/temp as result
    java -classpath all jar -I:c:/temp/ -M:EXIF
    java -classpath all jar -I:c:/temp/ -M:TXT
  • Will create a file c:/temp/xx.txt for each JPG in c:/temp as result, using 4 threads
    java -classpath all jar -I:c:/temp/ -M:EXIF -T:4

For examples, using GUI mode:
MetaData SPR in GUI mode

  • Will start GUI
    javaw -classpath all jar -W
  • Will start GUI and open file toto.jpg javaw -classpath all jar -I:c:/toto.jpg -W

If you get an out of memory error you can do:

java -Xms128M -Xmx512M -classpath all jar -I:[IN] -O:[OUT] -M:[MODE] -GC -T:[X] -W

Caution to Upper/Lower cases in the Xms and Xmx options.

  • Xms: minimum memory that can be used.
  • Xmx: maximum memory that can be used (do not put more than 1500 here if you are a Windows user).

Known bug or issues

05.10.09

A lot for sure, still in alpha.

Some picture with odd Meta Data structure may not work at all.

You can send me reports of images that does not work.

Reading the mdt/Todo class may help you with the known bugs.

Most of bugs are are for Nikon tags right now.

Historic

03.06.10

v0.4 Alpha: First release (2009 May 10)

  • Canon meta data (all cases) should work at 95%
  • Exif meta data should work at 90%
  • TIFF (or Exif IFDx) meta data should work at 90%
  • GPS meta data should work at 95%
  • IPTC meta data should work at 95%

v0.5 Alpha: Second release (2009 May 16)

  • Recoded the Exif engine for more efficient reading
  • Added exception every where
  • OutPut (Txt/Exif) will no more show empty directory
  • Canon meta data
    • Changed a label for Custom 10D
    • Corrected an error in FileInfo parser
    • adjusted some parser for better speed
  • Will no more read twice a tag (idfX issue)
    • So X and Y Resolution should be more accurate for TIFF
  • GPS meta data
    • Better decoration of latitude / longitude
    • Removed coordinates and Timestamp Java type
  • Casio (type1 and 2) meta data should work at 95%
  • FujiFilm meta data should work at 90%

v0.6 Alpha: Third release (2009 June 16)

  • Reorganized the Spring imports. Each directory now handle its own files.
  • Began the Nikon directory (type1, 2 and '3'). Restriction for coded tag : will stay that way until I understand how to decode them. Nikon should work at 50%.
  • Corrected a big bug in SignedShort
  • Added easy constructors for rational
  • Changed the MarkerRule behavior and added ByteRule
  • Upgraded ExifSegment analyze for IParser length (will be more accurate and consume less memory)
  • Changed the type definition for all Tags. Impact is heavy on Spring declaration, but make things more easy (declarations may change again with Spring 3.0)
  • Updated Canon1D custom function parsing
  • Changed the Run.class for better handling

v0.7 Alpha : Fourth release (2009 June 28)

  • Nikon should work at 65%.
  • Removed a System.out.println in Canon (forgot it in previous release)
  • Added better handling for rational with a zero denominator
  • Coded the masked tag for Nikon
  • Removed classes / interfaces XxxMakerTag and XxxOffsetTag in order to simplify code. Impacted Spring files.
  • Removed the notion of group, this may come back later but was not used
  • Removed the preview tag for now, may come back later
  • Removed trace log in tag constructor since there is a Spring option for that
  • Centralized all parsing / reading of type into one method (UtilsType.readValue). This corrected a bug in IndexedParser
  • Added checks while parsing array values
  • Added bench info for time and memory consumption
  • Optimized memory usage for tag. Will only keep byte representation if needed.
  • Moved name property and getDescription method into AbstractObject class.
  • Changed type of bundle property into HierarchicalMessageSource

v0.8 Alpha : Fifth release (2009 July 24)

  • Completed some Nikon tags and decorator
  • Corrected an error with Exif User comment not showing properly
  • Corrected an error with TagContainer counting (error due to masked type)
  • Olympus should work at 90% (see new result file)
  • Changed method getMessage in order to use ... instead of Object[]
  • Corrected possible infinite loop for Canon Custom Function 2
  • Replaced project URL (https -> http)
  • Changed IPTC segment parser for better handling of tags
  • IPTC Digits works better now (Urgency and Envelope priority)
  • IPTC Added a decorator for Category
  • Changed all Parser behavior for better handling. Should prevent two bugs that popped up in Olympus parsing.
  • Renamed TYPE_LONG_UNSIGNED and TYPE_LONG_SIGNED into TYPE_UNSIGNED_LONG and TYPE_SIGNED_LONG for consistency.
  • Added a new file in release that will contained:
    • detailed camera list used for testing (Canon 1D, ...)
    • % of tag ok, ko, found and not found (for each picture)
    This mechanic should prevent regressions.
  • Corrected casio2.previewimage declaration in spring
  • Corrected issue with FacePositions in Fujifilm
  • Added common DataDump decorator for Nikon, Olympus and Fujifilm
  • Classes used for test/generation have been moved to an other project

v0.9 Alpha : Sixth release (2009 nov 24)

  • Synchronization with ExifTool 7.98
    • Canon tags updated (added 7D and EOS-1D Mark IV, split PowerShotCameraInfo)
    • Casio tags updated (new tags)
    • TIFF (label adjustment)
    • FujiFilm (label adjustment)
    • Olympus (bug corrected and label adjustment)
  • Corrected bugs with Canon PowerShots, better recognition for Canon
  • Corrected Typo with IDF_
  • Added Sony tags (works at 95%)
  • Added Panasonic tags (works at 95%)
  • Changed the Decorator pattern for all tags
  • Changed the getType method for ITag
  • Moved getValueAsXxx from Decorator to ITag
  • Corrected an error in Rational for 0 value (represented as NaN)
  • Adjusted TestElment (used for Result File) in order to be more efficient with numbers.
  • Added Windows string decorator (for IDF-Xp...)
  • Re-organized Tags classes and interfaces

v0.10 Alpha : Seventh release (2010 Jan 09)

  • Pentax added
    • But does not work at all with istD picture and some devices
  • Kodak added
    • But does not work with all kodak devices (Type 8 and 10)
  • Some Sony devices are now better analyzed (since they were using olympus directory)
  • Changed dependencies, using Spring 3.0 release
    • Removed bean id when not necessary
    • Changed the way tags are linked (for canon afinfo and afinfo2)
  • Changed some interfaces for easier code reading
  • Corrected a bug in computation of tag length
  • Added -GC option in order to activate or not memory usage. I added this because the cost of memory usage is upon execution time.

v0.11 Alpha : Height release (2010 Fev 14)

  • Minolta added.
  • Corrected a bug with Kodak type discovery.
    • Added the fact that KodakBordersIFD, KodakEffectsIFD and MetaIFD are not analyzed.
  • Added a lot of images for better testing.
  • Added a MetaDataSpr segment for keeping track of information such as file name, date of analyze and time used for analyze.
  • Changed completely parser philosophy
    • Will speed up treatment of data a lot.
    • Will consume less memory (twice less).
  • Uniformization for logging message in all parser.
  • Updated some Canon decorator (this explain the small raise for this family of tags).
  • Synchronization with ExifTool 8.10
    • Except for Nikon

v0.12 Alpha : Ninth release (2010 March 6)

  • XMP family tag added.
    • Change ITag interface/class hierarchy
    • Note: I could not test all XMP tags yet ...
  • Added multi-thread treatments (-T:x option)
    • As a result, access to Spring context is now synchronized when needed (prototype object)
    • This gives a small speed up (very small since the slowest part of the code is the instantiation time for marker note and directories)
    • Note that time of analyze is WRONG when using multi-thread
    • In order to have more readable logs, added file name in log line
  • Updates in Spring file for better centralization of spring options.
    • scope and lazy-init MUST be used direcly for each tag
    • Used default-lazy-init for better reading
  • Using Spring 3.0.1
  • Made a common bundle for words that are used more than once.
  • Some decorator were adjusted

v0.13 Alpha : Tenth release (2010 April 4)

  • Reviewed Spring loader class
  • Added IJpegFile for better handling
  • Added a GUI renderer with menu
  • Added -W option for starting GUI mode
  • Added HTML as a valid output mode (using -M:HTML)

v0.14 Alpha : Tenth release (2010 May)

  • Updated Spring 3.01 to 3.02
  • Added serialization ID in tags and attached objects
  • Synchronization with ExifTool 8.17
    • Except for Nikon
    • Removed PrintIM from element comparison because it was not relevant.
  • Changed distribution process because of a strange bug preventing loadBeandefinitions to work properly.
  • Should be last alpha covering 99% of Canon camera types.

Result file for Alpha 0.14

03.06.10

View more informations in Result-*-.xls file.

Marker OK % Error % Missing % Nb Image Time (ms)
Canon 94,994,300,71716NA used -T
Olympus 96,423,240,3324NA used -T
Nikon * 80,499,0410,47120NA used -T
Fujifilm 97,532,470,0012NA used -T
Casio 97,392,610,0029NA used -T
Sony 97,371,920,7165NA used -T
Kodak ** 88,632,029,3558NA used -T
HP ** 100,000,000,001NA used -T
Gps 96,513,490,001NA used -T
Panasonic 98,561,440,0069NA used -T
Pentax ** 69,513,6226,8748NA used -T
Minolta 95,813,890,3092NA used -T
Others 85,2514,750,004NA used -T
 
Total % 92,194,06 3,751239 NA used -T
 
Date 2010-05-18
MetaDataSpr Alpha 0.14
ExifTool 8.17
* A lots of information are crypted into Nikon MetaData.
** Not fully coded yet

Following tags are not analyzed:
System CanonVRD File ExifTool Composite Photoshop Adobe JFIF FotoStation File2 ICC IPTC2 MPImage2 MPImage1 MPF0 FlashPix MetaIFD PreviewIFD PrintIM KodakBordersIFD KodakEffectsIFD