[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-user
Subject: SANSELAN - parameters for writing exif metadata using TiffOutputField.create()
From: Martin Tomko <martin.tomko () geo ! uzh ! ch>
Date: 2009-07-15 11:53:56
Message-ID: 4A5DC354.3090701 () geo ! uzh ! ch
[Download RAW message or body]
Dear All,
I have been using Sanselan for some time with success to read metadata,
and to write in Lat/lon using the provided convenience method. I am now
trying to alter some other fields, and am not able to decode the
expected parameters in order to successfully write the values in.
example:
float azimut = ...
TiffOutputField dirfield =
outputSet.findField(GPSTagConstants.GPS_TAG_GPS_IMG_DIRECTION);
if (dirfield != null) {
outputSet.removeField(GPSTagConstants.GPS_TAG_GPS_IMG_DIRECTION);
outputSet.removeField(GPSTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF);
}
try {
TiffOutputField azimutField =
TiffOutputField.create(GPSTagConstants.GPS_TAG_GPS_IMG_DIRECTION,outputSet.byteOrder,
azimut);
TiffOutputField azimutFieldRef =
TiffOutputField.create(GPSTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF,outputSet.byteOrder,
"M");
exifDirectory = outputSet.getOrCreateExifDirectory();
exifDirectory.add(azimutField);
exifDirectory.add(azimutFieldRef);
} catch (ImageWriteException e) {
e.printStackTrace();
}
Results in the following Exception:
org.cmc.sanselan.ImageWriteException: Tag does not expect a single value.
at
org.cmc.sanselan.formats.tiff.write.TiffOutputField.create(TiffOutputField.java:73)
What are the correct values to be used? Where can I find the
documentation for the parameter values, especially the byte order and
the allowed value types for the variables?
Thanks
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic