Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed May 5, 2022
1 parent ffc971e commit e8ba160
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions Source/com/drew/metadata/TagDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,9 @@ protected String getOrientationDescription(int tag)
@Nullable
protected String getShutterSpeedDescription(int tag)
{
// I believe this method to now be stable, but am leaving some alternative snippets of
// code in here, to assist anyone who's looking into this (given that I don't have a public CVS).

// float apexValue = _directory.getFloat(ExifSubIFDDirectory.TAG_SHUTTER_SPEED);
// int apexPower = (int)Math.pow(2.0, apexValue);
// return "1/" + apexPower + " sec";
// TODO test this method
// thanks to Mark Edwards for spotting and patching a bug in the calculation of this
// description (spotted bug using a Canon EOS 300D)
// thanks also to Gli Blr for spotting this bug
// Thanks to Mark Edwards for spotting and patching a bug in the calculation of this
// description (spotted bug using a Canon EOS 300D).
// Thanks also to Gli Blr for spotting this bug.
Float apexValue = _directory.getFloatObject(tag);
if (apexValue == null)
return null;
Expand All @@ -387,26 +380,6 @@ protected String getShutterSpeedDescription(int tag)
int apexPower = (int)((Math.exp(apexValue * Math.log(2))));
return "1/" + apexPower + " sec";
}

/*
// This alternative implementation offered by Bill Richards
// TODO determine which is the correct / more-correct implementation
double apexValue = _directory.getDouble(ExifSubIFDDirectory.TAG_SHUTTER_SPEED);
double apexPower = Math.pow(2.0, apexValue);
StringBuffer sb = new StringBuffer();
if (apexPower > 1)
apexPower = Math.floor(apexPower);
if (apexPower < 1) {
sb.append((int)Math.round(1/apexPower));
} else {
sb.append("1/");
sb.append((int)apexPower);
}
sb.append(" sec");
return sb.toString();
*/
}

// EXIF UserComment, GPSProcessingMethod and GPSAreaInformation
Expand Down

0 comments on commit e8ba160

Please sign in to comment.