π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Give tsc a helping hand
Manav Rathiaf61774d932c
diff --git a/web/packages/new/photos/services/ml/f-index.ts b/web/packages/new/photos/services/ml/f-index.tsindex 78aac543fe..c5ab400b9b 100644--- a/web/packages/new/photos/services/ml/f-index.ts+++ b/web/packages/new/photos/services/ml/f-index.ts@@ -634,8 +634,9 @@ const applyLaplacian = (const numCols = paddedImage[0]!.length - 2;// Create an output image initialized to 0.- const outputImage: number[][] = Array.from({ length: numRows }, () =>- new Array(numCols).fill(0),+ const outputImage = Array.from(+ { length: numRows },+ () => new Array(numCols).fill(0) as number[],);// Define the Laplacian kernel.@@ -671,11 +672,12 @@ const padImage = (image: number[][], direction: FaceDirection): number[][] => {const paddedNumRows = numRows + 2;// Create a new matrix with extra padding.- const paddedImage: number[][] = Array.from({ length: paddedNumRows }, () =>- new Array(paddedNumCols).fill(0),+ const paddedImage = Array.from(+ { length: paddedNumRows },+ () => new Array(paddedNumCols).fill(0) as number[],);- if (direction === "straight") {+ if (direction == "straight") {// Copy original image into the center of the padded image.for (let i = 0; i < numRows; i++) {for (let j = 0; j < paddedNumCols - 2; j++) {@@ -683,7 +685,7 @@ const padImage = (image: number[][], direction: FaceDirection): number[][] => {image[i]![j + Math.round(removeSideColumns / 2)]!;}}- } else if (direction === "left") {+ } else if (direction == "left") {// If the face is facing left, we only take the right side of the face// image.for (let i = 0; i < numRows; i++) {@@ -692,7 +694,6 @@ const padImage = (image: number[][], direction: FaceDirection): number[][] => {}}} else {- // "right"// If the face is facing right, we only take the left side of the face// image.for (let i = 0; i < numRows; i++) {