Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Refactor

laurenspriem47c9a90e48f4
diff --git a/mobile/apps/photos/rust/src/api/image_processing_api.rs b/mobile/apps/photos/rust/src/api/image_processing_api.rs
index 319961d412..4a7e115795 100644
--- a/mobile/apps/photos/rust/src/api/image_processing_api.rs
+++ b/mobile/apps/photos/rust/src/api/image_processing_api.rs
@@ -1,6 +1,6 @@
-use crate::ml::{
- decode::decode_image_from_path,
- face::thumbnail::{FaceBox, generate_face_thumbnails as generate_face_thumbnails_impl},
+use crate::{
+ image::decode::decode_image_from_path,
+ ml::face::thumbnail::{FaceBox, generate_face_thumbnails as generate_face_thumbnails_impl},
};
#[derive(Clone, Debug)]
diff --git a/mobile/apps/photos/rust/src/api/ml_indexing_api.rs b/mobile/apps/photos/rust/src/api/ml_indexing_api.rs
index a7a418a3c7..fde0fe6f07 100644
--- a/mobile/apps/photos/rust/src/api/ml_indexing_api.rs
+++ b/mobile/apps/photos/rust/src/api/ml_indexing_api.rs
@@ -1,6 +1,6 @@
+use crate::image::decode::decode_image_from_path;
use crate::ml::{
clip::image::run_clip_image,
- decode::decode_image_from_path,
error::{MlError, MlResult},
face::{align::run_face_alignment, detect::run_face_detection, embed::run_face_embedding},
runtime::{self, ExecutionProviderPolicy, MlRuntimeConfig, ModelPaths},
diff --git a/mobile/apps/photos/rust/src/ml/decode.rs b/mobile/apps/photos/rust/src/image/decode.rs
similarity index 100%
rename from mobile/apps/photos/rust/src/ml/decode.rs
rename to mobile/apps/photos/rust/src/image/decode.rs
diff --git a/mobile/apps/photos/rust/src/image_processing/image_compression.rs b/mobile/apps/photos/rust/src/image/image_compression.rs
similarity index 100%
rename from mobile/apps/photos/rust/src/image_processing/image_compression.rs
rename to mobile/apps/photos/rust/src/image/image_compression.rs
diff --git a/mobile/apps/photos/rust/src/image_processing/mod.rs b/mobile/apps/photos/rust/src/image/mod.rs
similarity index 62%
rename from mobile/apps/photos/rust/src/image_processing/mod.rs
rename to mobile/apps/photos/rust/src/image/mod.rs
index a3f47c6ca9..0e18d4e62f 100644
--- a/mobile/apps/photos/rust/src/image_processing/mod.rs
+++ b/mobile/apps/photos/rust/src/image/mod.rs
@@ -1 +1,2 @@
+pub mod decode;
pub mod image_compression;
diff --git a/mobile/apps/photos/rust/src/lib.rs b/mobile/apps/photos/rust/src/lib.rs
index 548ebcc676..004f3a1a19 100644
--- a/mobile/apps/photos/rust/src/lib.rs
+++ b/mobile/apps/photos/rust/src/lib.rs
@@ -1,4 +1,4 @@
pub mod api;
mod frb_generated;
-pub mod image_processing;
+pub mod image;
pub mod ml;
diff --git a/mobile/apps/photos/rust/src/ml/face/thumbnail.rs b/mobile/apps/photos/rust/src/ml/face/thumbnail.rs
index 8db738c64d..a7b2770e39 100644
--- a/mobile/apps/photos/rust/src/ml/face/thumbnail.rs
+++ b/mobile/apps/photos/rust/src/ml/face/thumbnail.rs
@@ -3,7 +3,7 @@ use fast_image_resize::{
images::{Image as FirImage, ImageRef as FirImageRef},
};
-use crate::image_processing::image_compression::{
+use crate::image::image_compression::{
EncodedImageFormat, FACE_THUMBNAIL_JPEG_QUALITY, encode_rgb,
};
use crate::ml::{
diff --git a/mobile/apps/photos/rust/src/ml/mod.rs b/mobile/apps/photos/rust/src/ml/mod.rs
index b28627516d..7d69c32d2e 100644
--- a/mobile/apps/photos/rust/src/ml/mod.rs
+++ b/mobile/apps/photos/rust/src/ml/mod.rs
@@ -1,5 +1,4 @@
pub mod clip;
-pub mod decode;
pub mod error;
pub mod face;
pub mod onnx;