当我将TiffOutputDirectory添加到TiffOutputSet时总是会抛出异常:TiffOutputDirectory到TiffOutputSet总是会抛出异常。
FileOutputStream fos = new FileOutputStream(finalFile);
OutputStream os = new BufferedOutputStream(fos);
TiffOutputSet outputSet = new TiffOutputSet();
Message message = (Message) messanges_exif.get(i);
TiffOutputDirectory tiff = outputSet.getOrCreateExifDirectory();
String asciTifdate = exifFormat.format(message.getCreatedAt())+0x00;
TiffOutputField field = new
TiffOutputField(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL,
FieldType.FIELD_TYPE_ASCII,
asciTifdate.length(),asciTifdate.getBytes());
tiff.add(field);
try {
outputSet.addDirectory(tiff); //Here is the error
} catch (Exception e){
Log.e("Tiff",e.toString());
}