Ignore:
Timestamp:
2017-10-30T22:46:09+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #15505 - update to metadata-extractor 2.10.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/drew/metadata/exif/makernotes/SonyType1MakernoteDescriptor.java

    r10862 r13061  
    11/*
    2  * Copyright 2002-2016 Drew Noakes
     2 * Copyright 2002-2017 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    3333 * @author Drew Noakes https://drewnoakes.com
    3434 */
     35@SuppressWarnings("WeakerAccess")
    3536public class SonyType1MakernoteDescriptor extends TagDescriptor<SonyType1MakernoteDirectory>
    3637{
     
    433434    public String getVignettingCorrectionDescription()
    434435    {
    435         return getIndexedDescription(TAG_VIGNETTING_CORRECTION, "Off", null, "Auto");
     436        Integer value = _directory.getInteger(TAG_VIGNETTING_CORRECTION);
     437        if (value == null)
     438            return null;
     439        switch (value) {
     440            case 0: return "Off";
     441            case 2: return "Auto";
     442            case 0xffffffff: return "N/A";
     443            default: return String.format("Unknown (%d)", value);
     444        }
    436445    }
    437446
     
    439448    public String getLateralChromaticAberrationDescription()
    440449    {
    441         return getIndexedDescription(TAG_LATERAL_CHROMATIC_ABERRATION, "Off", null, "Auto");
     450        Integer value = _directory.getInteger(TAG_LATERAL_CHROMATIC_ABERRATION);
     451        if (value == null)
     452            return null;
     453        switch (value) {
     454            case 0: return "Off";
     455            case 2: return "Auto";
     456            case 0xffffffff: return "N/A";
     457            default: return String.format("Unknown (%d)", value);
     458        }
    442459    }
    443460
     
    445462    public String getDistortionCorrectionDescription()
    446463    {
    447         return getIndexedDescription(TAG_DISTORTION_CORRECTION, "Off", null, "Auto");
     464        Integer value = _directory.getInteger(TAG_DISTORTION_CORRECTION);
     465        if (value == null)
     466            return null;
     467        switch (value) {
     468            case 0: return "Off";
     469            case 2: return "Auto";
     470            case 0xffffffff: return "N/A";
     471            default: return String.format("Unknown (%d)", value);
     472        }
    448473    }
    449474
Note: See TracChangeset for help on using the changeset viewer.