π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix(mobile): update panorama logic
Prateek Sunale0952de376c4
diff --git a/mobile/lib/utils/panorama_util.dart b/mobile/lib/utils/panorama_util.dartindex 16e1a41cee..ad5029c8a2 100644--- a/mobile/lib/utils/panorama_util.dart+++ b/mobile/lib/utils/panorama_util.dart@@ -1,19 +1,14 @@import "dart:io";-import "package:photos/utils/exif_util.dart";-import "package:xmp/xmp.dart";+import "package:flutter/painting.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";+ final image = await decodeImageFromList(await file.readAsBytes());+ final width = image.width.toDouble();+ final height = image.height.toDouble();++ if (height > width) {+ return height / width >= 2.0;+ }+ return width / height >= 2.0;}