mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-13 11:40:42 +00:00
deleted focalLengthFromTags
This commit is contained in:
parent
599b2dd6b9
commit
175beaa21d
3 changed files with 0 additions and 14 deletions
|
@ -250,7 +250,6 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
|
|||
final bytes = await file.readAsBytes();
|
||||
Directory(file.path).deleteSync(recursive: true);
|
||||
final tags = await readExifFromBytes(bytes);
|
||||
_meteringInteractor.setCameraFocalLength(focalLengthFromTags(tags));
|
||||
return evFromTags(tags);
|
||||
} catch (e, stackTrace) {
|
||||
_analytics.logCrash(e, stackTrace);
|
||||
|
|
|
@ -73,7 +73,6 @@ class MockCameraContainerBloc extends CameraContainerBloc {
|
|||
try {
|
||||
final bytes = (await rootBundle.load(PlatformConfig.cameraStubImage)).buffer.asUint8List();
|
||||
final tags = await readExifFromBytes(bytes);
|
||||
_meteringInteractor.setCameraFocalLength(focalLengthFromTags(tags));
|
||||
return evFromTags(tags);
|
||||
} catch (e, stackTrace) {
|
||||
log(e.toString(), stackTrace: stackTrace);
|
||||
|
|
|
@ -6,7 +6,6 @@ import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
|||
const String _isoExifKey = 'EXIF ISOSpeedRatings';
|
||||
const String _apertureExifKey = 'EXIF FNumber';
|
||||
const String _shutterSpeedExifKey = 'EXIF ExposureTime';
|
||||
const String _focalLengthIn35mmExifKey = "EXIF FocalLengthIn35mmFilm";
|
||||
|
||||
double evFromTags(Map<String, IfdTag> tags) {
|
||||
final iso = double.tryParse("${tags[_isoExifKey]}");
|
||||
|
@ -29,14 +28,3 @@ double evFromTags(Map<String, IfdTag> tags) {
|
|||
|
||||
return log2(math.pow(aperture, 2)) - log2(speed) - log2(iso / 100);
|
||||
}
|
||||
|
||||
int focalLengthFromTags(Map<String, IfdTag> tags) {
|
||||
final focalLengthIn35mm = int.tryParse("${tags[_focalLengthIn35mmExifKey]}");
|
||||
if (focalLengthIn35mm == null) {
|
||||
throw ArgumentError(
|
||||
'Error parsing focal length',
|
||||
['$_focalLengthIn35mmExifKey: ${tags[_focalLengthIn35mmExifKey]}'].join(', '),
|
||||
);
|
||||
}
|
||||
return focalLengthIn35mm;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue