commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasper F√łns <kfo...@gmail.com>
Subject [sanselan] Writing EXIF data to JPEG
Date Tue, 06 Mar 2012 22:46:34 GMT
Hi Sanselan.

I have a hard time finding out how to use Sanselan.

Suppose I have some JPEG picture which I want to add some attributes to.
If for example I want to add some user comment or date I try this:

TiffOutputSet outputSet = new TiffOutputSet();
TiffOutputField dateTaken = 
TiffOutputField.create(TiffConstants.EXIF_TAG_CREATE_DATE, 
outputSet.byteOrder, "2003:03:29 17:47:50");
TiffOutputField comment = 
TiffOutputField.create(TiffConstants.EXIF_TAG_IMAGE_DESCRIPTION, 
outputSet.byteOrder, "This is a test!");

However, both of these fails on "unexpected data type".
If I am not supposed to give a String, then what I am supposed to supply?

I hope you can help with these, probably noobish questions.

/Kasper

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message