本文整理了Java中com.drew.metadata.Directory.getInt()
方法的一些代码示例,展示了Directory.getInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Directory.getInt()
方法的具体详情如下:
包路径:com.drew.metadata.Directory
类名称:Directory
方法名:getInt
[英]Returns the specified tag's value as an int, if possible. Every attempt to represent the tag's value as an int is taken. Here is a list of the action taken depending upon the tag's original type:
代码示例来源:origin: stackoverflow.com
orientation = directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);
} catch (MetadataException me) {
logger.warn("Could not get orientation");
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setBitPerPixel(Directory directory, int tagType1, int tagType2) {
try {
setBitPerPixel(directory.getInt(tagType1) * directory.getInt(tagType2));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setAudioSampleSize(Directory directory, int tagType) {
try {
setAudioSampleSize(directory.getInt(tagType));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setPixelWidth(Directory directory, int tagType) {
try {
setPixelWidth(directory.getInt(tagType));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setPixelHeight(Directory directory, int tagType) {
try {
setPixelHeight(directory.getInt(tagType));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setDPIWidth(Directory directory, int tagType, double factor) {
try {
setDPIWidth(directory.getInt(tagType) * factor);
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setDPIHeight(Directory directory, int tagType, double factor) {
try {
setDPIHeight(directory.getInt(tagType) * factor);
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setOrientation(Directory directory, int tagType) {
try {
setOrientation(directory.getInt(tagType));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setDPIWidth(Directory directory, int tagType) {
try {
setDPIWidth(directory.getInt(tagType));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setDPIHeight(Directory directory, int tagType) {
try {
setDPIHeight(directory.getInt(tagType));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
public void setBitPerPixel(Directory directory, int tagType) {
try {
setBitPerPixel(directory.getInt(tagType));
} catch (MetadataException e) {
// Nothing needs to be done
}
}
代码示例来源:origin: torakiki/sejda
private static int readExifOrientation(Metadata metadata) throws MetadataException {
Directory directory = metadata.getFirstDirectoryOfType(ExifIFD0Directory.class);
return directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);
}
代码示例来源:origin: org.sejda/sejda-sambox
private static int readExifOrientation(Metadata metadata) throws MetadataException {
Directory directory = metadata.getFirstDirectoryOfType(ExifIFD0Directory.class);
return directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);
}
代码示例来源:origin: fluxtream/fluxtream-app
/**
* Tries to read the orientation data from the given image {@link Metadata}. Returns <code>null</code> if not
* found or if an error occurs.
*/
@Nullable
public static ImageOrientation getOrientation(@Nullable final Metadata metadata) {
if (metadata != null) {
final Directory exifIfd0Directory = metadata.getDirectory(ExifIFD0Directory.class);
if (exifIfd0Directory != null) {
try {
return findById(exifIfd0Directory.getInt(ExifIFD0Directory.TAG_ORIENTATION));
}
catch (Exception e) {
LOG.info("ImageOrientation.getOrientation(): Exception while trying to read the orientation data from the EXIF. Ignoring and just returning null");
}
}
}
return null;
}
代码示例来源:origin: xautlx/s2jh4net
int orientation = directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);
代码示例来源:origin: stackoverflow.com
Metadata header;
try {
ByteArrayInputStream bais= new ByteArrayInputStream(data);
ExifReader reader = new ExifReader(bais);
header = reader.extract();
Directory dir = header.getDirectory(ExifDirectory.class);
if (dir.containsTag(ExifDirectory.TAG_ORIENTATION)) {
Log.v(TAG, "tag_orientation exists: " + dir.getInt(ExifDirectory.TAG_ORIENTATION));
}
else {
Log.v(TAG, "tag_orietation doesn't exist");
}
} catch (JpegProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MetadataException e) {
e.printStackTrace();
}
代码示例来源:origin: stackoverflow.com
orientation = directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);
} catch (MetadataException me) {
System.out.println("Could not get orientation");
内容来源于网络,如有侵权,请联系作者删除!