RC1
Released 9 May 2011
- New metadata support
- Added support for XMP metadata
- Added support for Photoshop metadata embedded in Jpeg files
- Added support for ICC colour profiles
- Added support for JFIF metadata
- Added many more tags to IPTC directory
- Makernotes
- Improved support for Panasonic makernotes, including decoding of detected and recognised faces in images
- Wider support for Canon makernote data
- Renamed existing
SonyMakernoteclasses toSonyType1Makernote - Added tags to the previously empty
SonyType1MakernoteDirectory - Added support for Sony Type 6 makernotes
- Added support for Sigma/Foveon camera makernotes
- Added support for many more Panasonic makernote tags
- Considerable additions to Nikon Type 2 makernote handling (covering modern Nikon cameras)
- Reliability
- Converted all access to
byte[]inExifReaderto be viaBufferReader, ensuring proper bounds checking during processing JpegMetadataReaderno longer assumes that certain segments always hold one type of metadata, cycling through the segments available and opportunistically detecting segments that can be processed- Now stopping IFD processing when an invalid format type is encountered, helping to avoid populating directories with lots of rubbish from corrupt files
- Can now decode version numbers of form
[0 1 0 0]as well as[48 49 48 48] - Introduced new checked
BufferBoundsExceptionwhich is thrown by allBufferReadermethods, ensuring that calling code properly handles cases when we run out of data - Applied
@Nullableand@NotNullattributes across entire codebase
- Converted all access to
- Unit Tests
- Significantly improved IPTC unit testing.
- Added unit tests for Sony Type 1 and Type 6 makernotes
- Updated all unit tests to jUnit 4
AllTestsclass no longer needed and removed- Effort to make unit tests work in non-English locales
- Bugs
- Fixed a potential bug in
ExifReaderaround handling of float32/64 values. This may never have been seen as it doesn't seem that these types are ever used in Exif data - Fixed a potential exception in
Directory.getString(int)when the underlying value is an array of primitives other than int - Fixed typo in
GpsDirectorywhich incorrectly confused theTAG_GPS_IMG_DIRECTION_REFandTAG_GPS_IMG_DIRECTIONtag names - Corrected integer value assigned to tag
TAG_GPS_AREA_INFORMATION - Added proper decoding of
GpsDirectory.TAG_GPS_VERSION_ID - Introduced Yuri's fix for the various
SOF0-SOFFJpeg segments - Improved Exif directory 'user comment' decoding for various character sets.
- Avoid
OutOfMemoryErrorif the advertised size of the image thumbnail is larger than the available bytes in the Exif segment
- Fixed a potential bug in
- Public API changes
- Metadata and Directory are now both iterable, so they support
foreachnow - Removed checked
MetadataExceptionfrom all description getters - Refactored all
Readerclasses to take their data in the extract method, rather than in their constructors, offering thread safety and allowing reuse - Created method
Metadata.hasErrors()that reports whether there exists an error in any directory - Separated Exif IFD1 (thumbnail) tags out from the IFD0 tags and into the new
ExifThumbnailDirectorywithExifThumbnailDescriptor - Split
ExifDescriptorintoExifIFD0DescriptorandExifSubIFDDescriptorto mirror actual IFD structure in physical metadata, preventing against tag overwrites due to merging, and making later support for writing metadata easier - Added an overload of
Directory.getStringthat accepts a charset - Use of generics
- Replaced several instances of
ArrayListandHashMapwith their generic counterparts - Genericised methods on Metadata for obtaining Directory objects, removing several casts
- Made
TagDescriptorgeneric - Added generic constraint upon
Metadata.getDirectoryandMetadata.containsDirectorymethods and removed cast and check that are subsequently unnecessary - Made descriptor constructors take more specific directory types
- Replaced several instances of
- Added overload of
Directory.getDatethat accepts aTimeZoneto be used if the underlying value is a string and must be parsed - Renamed
ExifDirectory.TAG_COMPRESSIONtoExifDirectory.TAG_THUMBNAIL_COMPRESSION - Removed some incomplete and unused constants on
ExifDirectory - Removed dependency upon
com.sun.image.codec.jpeginJpegMetadataReader - Created hashCode method for
Rationalas it overrides equals - Removed old deprecated constructors for reader classes
- Metadata and Directory are now both iterable, so they support
- Internal API changes
Rationalnow backed by long, not int- Considerable simplification of interface
MetadataReaderand all its implementations - Overhauled means of reading different types from
byte[]}} across allReaderclasses via use of newBufferReader` class - Created methods to add arrays of float/double to a
Directory - Renamed
Metadata.getDirectoryasgetOrCreateDirectory, and made a new methodgetDirectorythat doesn't lazily create a directory - Metadata readers only accept non-null
byte[]as a data source - Added overload of
BufferReader.getStringthat takes a charset - Simplified
ExifReaderby removing some fields so that state is now mostly maintained on the stack JpegSegmentReader.readSegment()no longer throwsJpegProcessingException, simplifying some call sites too
- Findbugs support
- Addressed a few more minor Findbugs warnings
- Disabled Findbugs inspections on
XMPCoremodule
- Serialisation
DirectoryandDescriptorare no longer serialisable- Set
serialVersionUIDon all serialisable exception types, andRational
- Miscellaneous
- Added Javadoc to SVN for viewing via Google Code
- Updated source code headers with Apache 2 License banner
- Excluded
Outputfolder from IntelliJ project ImageMetadataReader.mainnow has an option to output Wiki format tables to more easily show sample output information on the project's wikiImageMetadataReader.mainnow accept multiple file paths- Several spelling mistakes corrected
- Removed commented code
- Removed compiler warnings
- Added some more sample images
RC2
Released 27 May 2011
- Created new
Ageclass for more meaningful representation of recognised people's ages in Panasonic camera photos. - Created descriptor methods for additional Panasonic makernote tags (for baby ages and text stamps)
- Fixed a bug where
PanasonicMakernoteDescriptor.getTitleDescriptionwas returning the text associated withTAG_LANDMARK - Created
PanasonicMakernoteDirectory.getAgemethod for raw access to theAgeobject associated with certain tags - Added missing
hashCode()method toFaceclass - Added missing getters to
Faceclass - Fixed logic that checks for the end of a printable string in
PanasonicMakernoteDescriptor - Fixed annotation issue
- Made the
XMPMetaobject instance available onXmpDirectoryfor general consumption - Added support for
AdobeJpegDirectoryand related classes, which comes from the APPE JPEG segment, when present - Additional API documentation
- Dealt with some incorrect code analysis warnings
RC 3 (released)
Released 18 Nov 2011
- Fixed a bug where adding an offset and length resulting in integer overflow was incorrectly passing a bounds check
- Added unit test for
IccReader - Added exception handling for parsing of numeric types from strings in
XmpReader - Fixed bug in parsing of JFIF data
- Added JFIF parsing unit test
- Removed ISO description check that multiplied ISO values less than 50 by 200
- Created utility class
ExtractAppSegmentBytesToFileUtilityfor writing specific JPG segments to files, and reading them again intobyte[]for convenience in unit testing (and keeping source code file size down)