mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
Compare commits
8 commits
22d481d096
...
6f3612cd55
Author | SHA1 | Date | |
---|---|---|---|
|
6f3612cd55 | ||
|
fb05fb101c | ||
|
6ba89d817d | ||
|
4f4b6cf1eb | ||
|
fac0d2a2c6 | ||
|
bd69487a52 | ||
|
f965b99e1d | ||
|
fc37016770 |
4 changed files with 10 additions and 4 deletions
|
@ -36,7 +36,6 @@ class LightmeterAnalyticsFirebase implements ILightmeterAnalyticsApi {
|
|||
stackTrace,
|
||||
reason: reason,
|
||||
information: information,
|
||||
fatal: true,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,14 @@ Future<double> evFromImage(Uint8List bytes) async {
|
|||
final apertureValueRatio = (tags["EXIF FNumber"]?.values as IfdRatios?)?.ratios.first;
|
||||
final speedValueRatio = (tags["EXIF ExposureTime"]?.values as IfdRatios?)?.ratios.first;
|
||||
if (iso == null || apertureValueRatio == null || speedValueRatio == null) {
|
||||
throw FlutterError('Error parsing EXIF: ${tags.keys}');
|
||||
throw ArgumentError(
|
||||
'Error parsing EXIF: ${tags.keys.join(', ')}',
|
||||
[
|
||||
if (iso == null) 'EXIF ISOSpeedRatings',
|
||||
if (apertureValueRatio == null) 'EXIF FNumber',
|
||||
if (speedValueRatio == null) 'EXIF ExposureTime',
|
||||
].join(', '),
|
||||
);
|
||||
}
|
||||
|
||||
final aperture = apertureValueRatio.numerator / apertureValueRatio.denominator;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: lightmeter
|
||||
description: Lightmeter app inspired by Material 3 design system.
|
||||
publish_to: "none"
|
||||
version: 0.17.1+47
|
||||
version: 0.17.2+48
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
|
|
@ -17,7 +17,7 @@ void main() {
|
|||
'no EXIF',
|
||||
() {
|
||||
final bytes = File('assets/launcher_icon_dev_512.png').readAsBytesSync();
|
||||
expectLater(evFromImage(bytes), throwsFlutterError);
|
||||
expectLater(evFromImage(bytes), throwsArgumentError);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue