commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Tyrrell <>
Subject [sanselan] How to read and write Description Field in Photoshop
Date Sat, 12 Jun 2010 20:27:59 GMT
I am trying to read and write the Photoshop entered Caption or Description.  When I save the
file off I see it shows up in two places in the output, but I do not see nor can I find any
good ways to update/create this in any examples or web searching.  Any pointers would be appreciated.

I looked at this site, and have the code working, but it does not show up in Photoshop as
I was hoping.
Using the example part way down, titled "Thanks for the demo code; how to write the UserComment

The relevant code is here:
               String userCommentHeaderForASCII = "ASCII\0\0\0";
               String userCommentData = userCommentHeaderForASCII + "some string value";
               TiffOutputField uc = new TiffOutputField(TiffConstants.EXIF_TAG_USER_COMMENT,

I also see that photoshop writes the info to two areas that are referenced here when I take
a raw image from a camera and edit the Description:

item: Image Description: 'This is a test description.' :: class org.apache.sanselan.formats.tiff.TiffImageMetadata$Item

item: Caption/Abstract: This is a test description. :: class org.apache.sanselan.common.ImageMetadata$Item
So photoshop is writing it out.

But I can not figure out a way to add in either of these two fields?

Any help would be appreciated.

Thank You


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message