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


Java Rational.toSimpleString方法代码示例

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


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

示例1: getExposureBiasDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getExposureBiasDescription()
{
    Rational value = _directory.getRational(TAG_EXPOSURE_BIAS);
    if (value == null)
        return null;
    return value.toSimpleString(true) + " EV";
}
 
开发者ID:drewnoakes,项目名称:metadata-extractor,代码行数:9,代码来源:ExifDescriptorBase.java

示例2: getCompressedAverageBitsPerPixelDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getCompressedAverageBitsPerPixelDescription()
{
    Rational value = _directory.getRational(TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL);
    if (value == null)
        return null;
    String ratio = value.toSimpleString(_allowDecimalRepresentationOfRationals);
    return value.isInteger() && value.intValue() == 1
        ? ratio + " bit/pixel"
        : ratio + " bits/pixel";
}
 
开发者ID:drewnoakes,项目名称:metadata-extractor,代码行数:12,代码来源:ExifDescriptorBase.java

示例3: getDigitalZoomDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getDigitalZoomDescription()
{
    Rational value = _directory.getRational(TAG_DIGITAL_ZOOM);
    return value == null
        ? null
        : value.getNumerator() == 0
            ? "No digital zoom"
            : value.toSimpleString(true) + "x digital zoom";
}
 
开发者ID:drewnoakes,项目名称:metadata-extractor,代码行数:11,代码来源:NikonType1MakernoteDescriptor.java

示例4: getDigitalZoomDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getDigitalZoomDescription()
{
    Rational value = _directory.getRational(TAG_DIGITAL_ZOOM);
    if (value==null)
        return null;
    return value.intValue() == 1
            ? "No digital zoom"
            : value.toSimpleString(true) + "x digital zoom";
}
 
开发者ID:drewnoakes,项目名称:metadata-extractor,代码行数:11,代码来源:NikonType2MakernoteDescriptor.java

示例5: getDigitalZoomDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getDigitalZoomDescription()
{
    Rational value = _directory.getRational(TAG_DIGITAL_ZOOM);
    if (value == null)
        return null;
    return value.toSimpleString(false);
}
 
开发者ID:drewnoakes,项目名称:metadata-extractor,代码行数:9,代码来源:OlympusMakernoteDescriptor.java

示例6: getSimpleRational

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
protected String getSimpleRational(final int tagType)
{
    Rational value = _directory.getRational(tagType);
    if (value == null)
        return null;
    return value.toSimpleString(true);
}
 
开发者ID:drewnoakes,项目名称:metadata-extractor,代码行数:9,代码来源:TagDescriptor.java

示例7: getRationalOrDoubleString

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
protected String getRationalOrDoubleString(int tagType)
{
    Rational rational = _directory.getRational(tagType);
    if (rational != null)
        return rational.toSimpleString(true);

    Double d = _directory.getDoubleObject(tagType);
    if (d != null) {
        DecimalFormat format = new DecimalFormat("0.###");
        return format.format(d);
    }

    return null;
}
 
开发者ID:drewnoakes,项目名称:metadata-extractor,代码行数:16,代码来源:TagDescriptor.java

示例8: getXResolutionDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getXResolutionDescription()
{
    Rational value = _directory.getRational(TAG_X_RESOLUTION);
    if (value == null)
        return null;
    final String unit = getResolutionDescription();
    return value.toSimpleString(_allowDecimalRepresentationOfRationals) +
        " dots per " +
        (unit == null ? "unit" : unit.toLowerCase());
}
 
开发者ID:byronb92,项目名称:ImageEXIFExtraction,代码行数:12,代码来源:ExifThumbnailDescriptor.java

示例9: getFocusDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getFocusDescription()
{
    Rational value = _directory.getRational(TAG_FOCUS);
    return value == null
        ? null
        : value.getNumerator() == 1 && value.getDenominator() == 0
            ? "Infinite"
            : value.toSimpleString(true);
}
 
开发者ID:ydanila,项目名称:j-metadata-extractor,代码行数:11,代码来源:NikonType1MakernoteDescriptor.java

示例10: getYResolutionDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getYResolutionDescription()
{
    Rational value = _directory.getRational(TAG_Y_RESOLUTION);
    if (value == null)
        return null;
    final String unit = getResolutionDescription();
    return value.toSimpleString(_allowDecimalRepresentationOfRationals) +
        " dots per " +
        (unit == null ? "unit" : unit.toLowerCase());
}
 
开发者ID:ydanila,项目名称:j-metadata-extractor,代码行数:12,代码来源:ExifThumbnailDescriptor.java

示例11: getFlashExposureValueDescription

import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getFlashExposureValueDescription()
{
    Rational value = _directory.getRational(TAG_FLASH_EV);
    return value == null ? null : value.toSimpleString(false) + " EV (Apex)";
}
 
开发者ID:byronb92,项目名称:ImageEXIFExtraction,代码行数:7,代码来源:FujifilmMakernoteDescriptor.java


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