mirror of
https://github.com/ente-io/ente.git
synced 2025-06-03 07:49:45 +00:00
20 lines
444 B
Dart
20 lines
444 B
Dart
import "dart:io";
|
|
|
|
import "package:photos/utils/exif_util.dart";
|
|
import "package:xmp/xmp.dart";
|
|
|
|
Future<bool> checkIfPanorama(File file) async {
|
|
try {
|
|
final result = XMP.extract(file.readAsBytesSync());
|
|
|
|
if (result["Rdf Projectiontype"] == "cylindrical") {
|
|
return true;
|
|
}
|
|
} catch (_) {}
|
|
|
|
final result = await readExifAsync(file);
|
|
|
|
final element = result["EXIF CustomRendered"];
|
|
return (element?.printable == "6");
|
|
}
|