本文整理汇总了Java中org.apache.commons.imaging.formats.tiff.taginfos.TagInfo类的典型用法代码示例。如果您正苦于以下问题:Java TagInfo类的具体用法?Java TagInfo怎么用?Java TagInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TagInfo类属于org.apache.commons.imaging.formats.tiff.taginfos包,在下文中一共展示了TagInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: findField
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public TiffField findField(final TagInfo tag, final boolean failIfMissing)
throws ImageReadException {
if (entries == null) {
return null;
}
for (TiffField field : entries) {
if (field.getTag() == tag.tag) {
return field;
}
}
if (failIfMissing) {
throw new ImageReadException("Missing expected field: "
+ tag.getDescription());
}
return null;
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:20,代码来源:TiffDirectory.java
示例2: TiffOutputField
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public TiffOutputField(final int tag, final TagInfo tagInfo, final FieldType fieldType,
final int count, final byte[] bytes) {
this.tag = tag;
this.tagInfo = tagInfo;
this.fieldType = fieldType;
this.count = count;
this.bytes = bytes;
if (isLocalValue()) {
separateValueItem = null;
} else {
final String name = "Field Seperate value (" + tagInfo.getDescription()
+ ")";
separateValueItem = new TiffOutputItem.Value(name, bytes);
}
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:17,代码来源:TiffOutputField.java
示例3: makeTagMap
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private static Map<Object, List<TagInfo>> makeTagMap(
final List<TagInfo> tags) {
// make sure to use the thread-safe version; this is shared state.
final Map<Object, List<TagInfo>> map = new Hashtable<Object, List<TagInfo>>();
for (TagInfo tag : tags) {
List<TagInfo> tagList = map.get(tag.tag);
if (tagList == null) {
tagList = new ArrayList<TagInfo>();
map.put(tag.tag, tagList);
}
tagList.add(tag);
}
return map;
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:17,代码来源:TiffField.java
示例4: findField
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public TiffField findField(final TagInfo tag, final boolean failIfMissing)
throws ImageReadException {
if (entries == null) {
return null;
}
for (final TiffField field : entries) {
if (field.getTag() == tag.tag) {
return field;
}
}
if (failIfMissing) {
throw new ImageReadException("Missing expected field: "
+ tag.getDescription());
}
return null;
}
开发者ID:apache,项目名称:commons-imaging,代码行数:20,代码来源:TiffDirectory.java
示例5: makeMergedTagList
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private static List<TagInfo> makeMergedTagList() {
final ArrayList<TagInfo> result = new ArrayList<>();
result.addAll(AdobePageMaker6TagConstants.ALL_ADOBE_PAGEMAKER_6_TAGS);
result.addAll(AdobePhotoshopTagConstants.ALL_ADOBE_PHOTOSHOP_TAGS);
result.addAll(AliasSketchbookProTagConstants.ALL_ALIAS_SKETCHBOOK_PRO_TAGS);
result.addAll(DcfTagConstants.ALL_DCF_TAGS);
result.addAll(DngTagConstants.ALL_DNG_TAGS);
result.addAll(ExifTagConstants.ALL_EXIF_TAGS);
result.addAll(GeoTiffTagConstants.ALL_GEO_TIFF_TAGS);
result.addAll(GdalLibraryTagConstants.ALL_GDAL_LIBRARY_TAGS);
result.addAll(GpsTagConstants.ALL_GPS_TAGS);
result.addAll(HylaFaxTagConstants.ALL_HYLAFAX_TAGS);
result.addAll(MicrosoftTagConstants.ALL_MICROSOFT_TAGS);
result.addAll(MicrosoftHdPhotoTagConstants.ALL_MICROSOFT_HD_PHOTO_TAGS);
result.addAll(MolecularDynamicsGelTagConstants.ALL_MOLECULAR_DYNAMICS_GEL_TAGS);
result.addAll(OceScanjobTagConstants.ALL_OCE_SCANJOB_TAGS);
result.addAll(Rfc2301TagConstants.ALL_RFC_2301_TAGS);
result.addAll(Tiff4TagConstants.ALL_TIFF_4_TAGS);
result.addAll(TiffEpTagConstants.ALL_TIFF_EP_TAGS);
result.addAll(TiffTagConstants.ALL_TIFF_TAGS);
result.addAll(WangTagConstants.ALL_WANG_TAGS);
return Collections.unmodifiableList(result);
}
开发者ID:apache,项目名称:commons-imaging,代码行数:25,代码来源:TiffTags.java
示例6: makeTagMap
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private static Map<Integer, List<TagInfo>> makeTagMap(
final List<TagInfo> tags) {
// make sure to use the thread-safe version; this is shared state.
final Map<Integer, List<TagInfo>> map = new HashMap<>();
for (final TagInfo tag : tags) {
List<TagInfo> tagList = map.get(tag.tag);
if (tagList == null) {
tagList = new ArrayList<>();
map.put(tag.tag, tagList);
}
tagList.add(tag);
}
return map;
}
开发者ID:apache,项目名称:commons-imaging,代码行数:17,代码来源:TiffTags.java
示例7: getExifValueDouble
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
/**
* Image direction
*
* @param tagInfo
*/
private double getExifValueDouble(final JpegImageMetadata jpegMetadata, final TagInfo tagInfo) {
try {
final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo);
if (field != null) {
return field.getDoubleValue();
}
} catch (final Exception e) {
// ignore
}
return Double.MIN_VALUE;
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:18,代码来源:Photo.java
示例8: getExifValueInt
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private int getExifValueInt(final JpegImageMetadata jpegMetadata, final TagInfo tiffTag, final int defaultValue) {
try {
final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tiffTag);
if (field != null) {
return field.getIntValue();
}
} catch (final Exception e) {
// ignore
}
return defaultValue;
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:14,代码来源:Photo.java
示例9: getExifValueString
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private String getExifValueString(final JpegImageMetadata jpegMetadata, final TagInfo tagInfo) {
try {
final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo);
if (field != null) {
return field.getStringValue();
}
} catch (final Exception e) {
// ignore
}
return null;
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:14,代码来源:Photo.java
示例10: getTiffValueString
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private String getTiffValueString(final TiffImageMetadata tiffMetadata, final TagInfo tagInfo) {
try {
final TiffField field = tiffMetadata.findField(tagInfo, true);
if (field != null) {
return field.getStringValue();
}
} catch (final Exception e) {
// ignore
}
return null;
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:14,代码来源:Photo.java
示例11: findEXIFValue
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public TiffField findEXIFValue(final TagInfo tagInfo) {
try {
return exif != null ? exif.findField(tagInfo) : null;
} catch (final ImageReadException cannotHappen) {
return null;
}
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:8,代码来源:JpegImageMetadata.java
示例12: findEXIFValueWithExactMatch
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public TiffField findEXIFValueWithExactMatch(final TagInfo tagInfo) {
try {
return exif != null ? exif.findField(tagInfo, true) : null;
} catch (final ImageReadException cannotHappen) {
return null;
}
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:8,代码来源:JpegImageMetadata.java
示例13: getFieldValue
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public Object getFieldValue(final TagInfo tag) throws ImageReadException {
final TiffField field = findField(tag);
if (field == null) {
return null;
}
return field.getValue();
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:8,代码来源:TiffDirectory.java
示例14: countTags
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private static Map<Object, Integer> countTags(final List<TagInfo> tags) {
final Map<Object, Integer> map = new Hashtable<Object, Integer>();
for (TagInfo tag : tags) {
final Integer count = map.get(tag.tag);
if (count == null) {
map.put(tag.tag, 1);
} else {
map.put(tag.tag, count + 1);
}
}
return map;
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:15,代码来源:TiffImageMetadata.java
示例15: findField
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public TiffField findField(final TagInfo tag) throws ImageReadException {
for (TiffDirectory directory : directories) {
final TiffField field = directory.findField(tag);
if (null != field) {
return field;
}
}
return null;
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:11,代码来源:TiffContents.java
示例16: getTag
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private static TagInfo getTag(final int directoryType, final int tag) {
final List<TagInfo> possibleMatches = ALL_TAG_MAP.get(tag);
if (null == possibleMatches) {
return TiffTagConstants.TIFF_TAG_UNKNOWN;
}
return getTag(directoryType, possibleMatches);
}
开发者ID:windwardadmin,项目名称:android-awt,代码行数:10,代码来源:TiffField.java
示例17: set
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private static void set(final JpegImageMetadata jpegMetadata, final TagInfo tagInfo, Struct info) throws ImageReadException {
final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo);
if (field != null) {
if(!info.containsKey(tagInfo.name)){
Object val = val(field.getValue());
if(val!=null)info.setEL(tagInfo.name, val);
}
}
}
开发者ID:lucee,项目名称:Lucee,代码行数:10,代码来源:Metadata.java
示例18: printTagValue
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
private static void printTagValue(final JpegImageMetadata jpegMetadata,
final TagInfo tagInfo) {
final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo);
if (field == null) {
System.out.println(tagInfo.name + ": " + "Not Found.");
} else {
System.out.println(tagInfo.name + ": "
+ field.getValueDescription());
}
}
开发者ID:codailama,项目名称:GeoTagPhotos,代码行数:11,代码来源:MetadataExample.java
示例19: getTimeStampFromImage
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
/**
* @param jpegMetadata
* Pass the metadata of the image.
* @return
* Capture timestamp of the image from the metadata. {@link ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL} is used to get the value.
* @throws ParseException
*/
public static Long getTimeStampFromImage(final JpegImageMetadata jpegMetadata) throws ParseException{
final TagInfo tagInfo = ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL;
final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo);
String dateOfCaptureString = field.getValueDescription();
SimpleDateFormat sdf = new SimpleDateFormat("''yyyy:MM:dd hh:mm:ss''");
Date dateOfCapture = sdf.parse(dateOfCaptureString);
return dateOfCapture.getTime();
}
开发者ID:codailama,项目名称:GeoTagPhotos,代码行数:16,代码来源:EXIFUtils.java
示例20: findField
import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; //导入依赖的package包/类
public TiffField findField(final TagInfo tag) throws ImageReadException {
for (final TiffDirectory directory : directories) {
final TiffField field = directory.findField(tag);
if (null != field) {
return field;
}
}
return null;
}
开发者ID:apache,项目名称:commons-imaging,代码行数:11,代码来源:TiffContents.java
注:本文中的org.apache.commons.imaging.formats.tiff.taginfos.TagInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论