π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline
Manav Rathieef9bf1f2690
diff --git a/web/apps/photos/src/utils/machineLearning/faceCrop.ts b/web/apps/photos/src/utils/machineLearning/faceCrop.tsindex f2e975af56..a6837d5bf0 100644--- a/web/apps/photos/src/utils/machineLearning/faceCrop.ts+++ b/web/apps/photos/src/utils/machineLearning/faceCrop.ts@@ -15,9 +15,14 @@ export function getFaceCrop(alignment: FaceAlignment,config: FaceCropConfig,): FaceCrop {- const box = getAlignedFaceBox(alignment);+ const alignmentBox = new Box({+ x: alignment.center.x - alignment.size / 2,+ y: alignment.center.y - alignment.size / 2,+ width: alignment.size,+ height: alignment.size,+ }).round();const scaleForPadding = 1 + config.padding * 2;- const paddedBox = enlargeBox(box, scaleForPadding).round();+ const paddedBox = enlargeBox(alignmentBox, scaleForPadding).round();const faceImageBitmap = cropWithRotation(imageBitmap, paddedBox, 0, {width: config.maxSize,height: config.maxSize,@@ -29,15 +34,6 @@ export function getFaceCrop(};}-function getAlignedFaceBox(alignment: FaceAlignment) {- return new Box({- x: alignment.center.x - alignment.size / 2,- y: alignment.center.y - alignment.size / 2,- width: alignment.size,- height: alignment.size,- }).round();-}-export async function storeFaceCrop(faceId: string,faceCrop: FaceCrop,