mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-14 12:10:41 +00:00

* extract focal length from exif * added focal length section * wip * [android] calculate EFL * split other platform handlers to separate files * [ios] calculate EFL * updated translations * deleted `focalLengthFromTags` * fixed unit tests * [ios] link missing files * updated Pro features screen * [ios] fixed signing * fixed screenshot generator * updated goldens * [android] updated store screenshots * wip * [ios] updated store screenshots * enable focal length feature by default * mock camera focal length for integration tests * cleanup * added logging to `CameraInfoService`
27 lines
716 B
Dart
27 lines
716 B
Dart
import 'dart:io';
|
|
|
|
import 'package:exif/exif.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:lightmeter/utils/exif_utils.dart';
|
|
|
|
void main() {
|
|
group('evFromTags', () {
|
|
test(
|
|
'camera_stub_image.jpg',
|
|
() async {
|
|
final bytes = File('assets/camera_stub_image.jpg').readAsBytesSync();
|
|
final tags = await readExifFromBytes(bytes);
|
|
expect(evFromTags(tags), 8.25230310752341);
|
|
},
|
|
);
|
|
|
|
test(
|
|
'no EXIF',
|
|
() async {
|
|
final bytes = File('assets/launcher_icon_dev_512.png').readAsBytesSync();
|
|
final tags = await readExifFromBytes(bytes);
|
|
expect(() => evFromTags(tags), throwsArgumentError);
|
|
},
|
|
);
|
|
});
|
|
}
|