Changeset 13061 in josm for trunk/src/com/drew/metadata/exif/makernotes/SonyType1MakernoteDescriptor.java
- Timestamp:
- 2017-10-30T22:46:09+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/drew/metadata/exif/makernotes/SonyType1MakernoteDescriptor.java
r10862 r13061 1 1 /* 2 * Copyright 2002-201 6Drew Noakes2 * Copyright 2002-2017 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 33 33 * @author Drew Noakes https://drewnoakes.com 34 34 */ 35 @SuppressWarnings("WeakerAccess") 35 36 public class SonyType1MakernoteDescriptor extends TagDescriptor<SonyType1MakernoteDirectory> 36 37 { … … 433 434 public String getVignettingCorrectionDescription() 434 435 { 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 } 436 445 } 437 446 … … 439 448 public String getLateralChromaticAberrationDescription() 440 449 { 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 } 442 459 } 443 460 … … 445 462 public String getDistortionCorrectionDescription() 446 463 { 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 } 448 473 } 449 474
Note:
See TracChangeset
for help on using the changeset viewer.