List of usage examples for org.apache.commons.imaging.formats.tiff.fieldtypes FieldType BYTE
FieldTypeByte BYTE
To view the source code for org.apache.commons.imaging.formats.tiff.fieldtypes FieldType BYTE.
Click Source Link
From source file:com.ubb.imaging.ExifMetadataWriter.java
public static TiffOutputField getNewXPTitle(TiffOutputSet outputSet, String newTitle) { TiffOutputField tiffOutputField = null; try {/*from w ww .j a v a 2 s . c o m*/ tiffOutputField = new TiffOutputField(TiffConstants.EXIF_TAG_XPTITLE, FieldType.BYTE, newTitle.getBytes("UTF-16").length, newTitle.getBytes("UTF-16")); } catch (UnsupportedEncodingException ex) { Logger.getLogger(ExifMetadataWriter.class.getName()).log(Level.SEVERE, ex.getMessage()); } return tiffOutputField; }
From source file:joachimeichborn.geotag.io.jpeg.PictureMetadataReader.java
private byte[] getTagByteValue(final TagInfo aTagInfo) { if (jpegMetadata != null) { final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(aTagInfo); if (field != null) { final FieldType fieldType = field.getFieldType(); if (fieldType.getType() == FieldType.BYTE.getType()) { return field.getByteArrayValue(); }//from www .j a v a 2 s . c om } } return null; }