当前位置: 首页>>代码示例>>Java>>正文


Java Directory.getRational方法代码示例

本文整理汇总了Java中com.drew.metadata.Directory.getRational方法的典型用法代码示例。如果您正苦于以下问题:Java Directory.getRational方法的具体用法?Java Directory.getRational怎么用?Java Directory.getRational使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.drew.metadata.Directory的用法示例。


在下文中一共展示了Directory.getRational方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testThumbnailXResolution

import com.drew.metadata.Directory; //导入方法依赖的package包/类
@Test
public void testThumbnailXResolution() throws Exception
{
    Directory directory = readDirectoryFromJpegFile("Tests/com/drew/metadata/exif/manuallyAddedThumbnail.jpg", ExifThumbnailDirectory.class);

    Rational rational = directory.getRational(ExifThumbnailDirectory.TAG_X_RESOLUTION);
    Assert.assertNotNull(rational);
    Assert.assertEquals(72, rational.getNumerator());
    Assert.assertEquals(1, rational.getDenominator());
}
 
开发者ID:mxbossard,项目名称:metadata-extractor-osgi,代码行数:11,代码来源:ExifReaderTest.java

示例2: testThumbnailYResolution

import com.drew.metadata.Directory; //导入方法依赖的package包/类
@Test
public void testThumbnailYResolution() throws Exception
{
    Directory directory = readDirectoryFromJpegFile("Tests/com/drew/metadata/exif/manuallyAddedThumbnail.jpg", ExifThumbnailDirectory.class);

    Rational rational = directory.getRational(ExifThumbnailDirectory.TAG_Y_RESOLUTION);
    Assert.assertNotNull(rational);
    Assert.assertEquals(72, rational.getNumerator());
    Assert.assertEquals(1, rational.getDenominator());
}
 
开发者ID:mxbossard,项目名称:metadata-extractor-osgi,代码行数:11,代码来源:ExifReaderTest.java

示例3: testXResolution

import com.drew.metadata.Directory; //导入方法依赖的package包/类
public void testXResolution() throws Exception
{
    String fileName = "Source/com/drew/metadata/exif/test/manuallyAddedThumbnail.jpg";
    Metadata metadata = new ExifReader(new File(fileName)).extract();
    Directory directory = metadata.getDirectory(ExifDirectory.class);
    Rational rational = directory.getRational(ExifDirectory.TAG_X_RESOLUTION);
    assertEquals(72, rational.getNumerator());
    assertEquals(1, rational.getDenominator());
}
 
开发者ID:ecologylab,项目名称:BigSemanticsJava,代码行数:10,代码来源:ExifReaderTest.java

示例4: testYResolution

import com.drew.metadata.Directory; //导入方法依赖的package包/类
public void testYResolution() throws Exception
{
    String fileName = "Source/com/drew/metadata/exif/test/manuallyAddedThumbnail.jpg";
    Metadata metadata = new ExifReader(new File(fileName)).extract();
    Directory directory = metadata.getDirectory(ExifDirectory.class);
    Rational rational = directory.getRational(ExifDirectory.TAG_Y_RESOLUTION);
    assertEquals(72, rational.getNumerator());
    assertEquals(1, rational.getDenominator());
}
 
开发者ID:ecologylab,项目名称:BigSemanticsJava,代码行数:10,代码来源:ExifReaderTest.java


注:本文中的com.drew.metadata.Directory.getRational方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。