From df951685bb453b36409d509b72c8322f3ef28b59 Mon Sep 17 00:00:00 2001 From: thermatk Date: Sat, 18 May 2024 12:36:16 +0200 Subject: [PATCH] [TF] kill more mlkit --- .../Paint/Views/StickerMakerView.java | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/Paint/Views/StickerMakerView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/Paint/Views/StickerMakerView.java index bf7896503..e4d99d995 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/Paint/Views/StickerMakerView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/Paint/Views/StickerMakerView.java @@ -35,14 +35,6 @@ import androidx.annotation.Nullable; -import com.google.mlkit.common.MlKitException; -import com.google.mlkit.vision.common.InputImage; -import com.google.mlkit.vision.label.ImageLabeling; -import com.google.mlkit.vision.label.defaults.ImageLabelerOptions; -import com.google.mlkit.vision.segmentation.subject.Subject; -import com.google.mlkit.vision.segmentation.subject.SubjectSegmentation; -import com.google.mlkit.vision.segmentation.subject.SubjectSegmenter; -import com.google.mlkit.vision.segmentation.subject.SubjectSegmenterOptions; import org.checkerframework.checker.units.qual.A; import org.telegram.messenger.AndroidUtilities; @@ -828,6 +820,7 @@ public void segmentImage(Bitmap source, int orientation, int containerWidth, int sourceBitmap = source; this.orientation = orientation; detectedEmoji = null; + /* segment(source, orientation, subjects -> { final ArrayList finalObjects = new ArrayList<>(); @@ -903,13 +896,13 @@ public void segmentImage(Bitmap source, int orientation, int containerWidth, int }); }); - }, whenEmpty); + }, whenEmpty);*/ } private static class SubjectMock { public Bitmap bitmap; public int startX, startY, width, height; - public static SubjectMock of(Subject subject) { + /*public static SubjectMock of(Subject subject) { SubjectMock m = new SubjectMock(); m.bitmap = subject.getBitmap(); m.startX = subject.getStartX(); @@ -917,7 +910,7 @@ public static SubjectMock of(Subject subject) { m.width = subject.getWidth(); m.height = subject.getHeight(); return m; - } + }*/ public static SubjectMock mock(Bitmap source) { SubjectMock m = new SubjectMock(); m.width = m.height = (int) (Math.min(source.getWidth(), source.getHeight()) * .4f); @@ -929,7 +922,7 @@ public static SubjectMock mock(Bitmap source) { } } - private void segment(Bitmap bitmap, int orientation, Utilities.Callback> whenDone, Utilities.Callback whenEmpty) { + /*private void segment(Bitmap bitmap, int orientation, Utilities.Callback> whenDone, Utilities.Callback whenEmpty) { segmentingLoading = true; SubjectSegmenter segmenter = SubjectSegmentation.getClient( new SubjectSegmenterOptions.Builder() @@ -988,7 +981,7 @@ private void segment(Bitmap bitmap, int orientation, Utilities.Callback