incubator-sanselan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Matthew Chen" <charlesmc...@gmail.com>
Subject IPTC
Date Mon, 20 Oct 2008 04:01:51 GMT
(In response to a question from Jonathan Giles)

Hi Jonathan (and Christopher, Nepomuk, Mark and Bjorn),

  A draft form of the IPTC changes are done, and I believe they are
ready to be looked at.

  I've prepared a snapshot of the repository that contains the IPTC
read/write code.

http://people.apache.org/~cmchen/apache-sanselan-incubating-0.95-19102008-snapshot-bin.zip
http://people.apache.org/~cmchen/apache-sanselan-incubating-0.95-19102008-snapshot-javadoc.jar
http://people.apache.org/~cmchen/apache-sanselan-incubating-0.95-19102008-snapshot-src.zip

  The following unit tests demonstrate how to use the IPTC features:

https://svn.apache.org/repos/asf/incubator/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/iptc/IptcDumpTest.java

  This test shows how to read and print the Photoshop/IPTC records
(if any) present in a JPEG file.

https://svn.apache.org/repos/asf/incubator/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/iptc/IptcUpdateTest.java

  This test shows how to remove, add/insert, and update
Photoshop/IPTC records in a JPEG.

  I haven't had time to document the Photoshop/IPTC changes yet.
Here are the basics: IPTC is an image metadata standard.  Adobe
Photoshop popularized a way of embedding IPTC data in App13 segments
of JPEG files using a binary format very similar to Photoshop's "image
resource blocks."  This Photoshop/IPTC data is organized in a "block"
of "records."  This IPTC data is just one of many blocks that appear
in the "Photoshop" App13 segments; modifying IPTC data should usually
leave the other blocks in the Photoshop App13 segment unchanged.  In
practice, App13 segments are only used for Photoshop metadata.

  The IPTC metadata in a Photoshop App13 segment is a series of
key-value pairs.  The keys are "record type" bytes, defined by the
standard and constantized in:

https://svn.apache.org/repos/asf/incubator/sanselan/trunk/src/main/java/org/apache/sanselan/formats/jpeg/iptc/IPTCConstants.java

  The values are strings.  In theory, these values should be encoded
in ISO-8859-1 unless the first block of the segment has a "text
encoding" record.  However, I have yet to find an image that
demonstrates this "text encoding" record, so I haven't added support
for it yet.  If you find one, please consider contributing it to the
project.

  Please take a look at the code as it stands and let me know if it
meets your needs.  Any and all feedback is welcome.

  More references:

http://en.wikipedia.org/wiki/International_Press_Telecommunications_Council
http://www.iptc.org/

  There is some remaining work to be done (besides writing proper
documentation).  Support for very large records is not yet done.  I
have yet to find an image that demonstrates this (again, such an
example image would be helpful).

  Once the IPTC work is settled, I suggest we try to release 0.95 and
have a discussion about what we want to have done before we release
version 1.0.

Thanks,
  Charles

Mime
View raw message