File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -289,15 +289,6 @@ public TagDescriptor(T directory)
289
289
290
290
protected string ? GetShutterSpeedDescription ( int tagId )
291
291
{
292
- // I believe this method to now be stable, but am leaving some alternative snippets of
293
- // code in here, to assist anyone who's looking into this (given that I don't have a public CVS).
294
- // float apexValue = _directory.getFloat(ExifSubIFDDirectory.TAG_SHUTTER_SPEED);
295
- // int apexPower = (int)Math.pow(2.0, apexValue);
296
- // return "1/" + apexPower + " sec";
297
- // TODO test this method
298
- // thanks to Mark Edwards for spotting and patching a bug in the calculation of this
299
- // description (spotted bug using a Canon EOS 300D)
300
- // thanks also to Gli Blr for spotting this bug
301
292
if ( ! Directory . TryGetSingle ( tagId , out float apexValue ) )
302
293
return null ;
303
294
@@ -310,7 +301,7 @@ public TagDescriptor(T directory)
310
301
}
311
302
else
312
303
{
313
- var apexPower = ( int ) Math . Exp ( apexValue * Math . Log ( 2 ) ) ;
304
+ var apexPower = ( int ) Math . Round ( Math . Exp ( apexValue * Math . Log ( 2 ) ) ) ;
314
305
return "1/" + apexPower + " sec" ;
315
306
}
316
307
}
You can’t perform that action at this time.
0 commit comments