From 01933ae06d85be6dc173d32178be3d2a1025c786 Mon Sep 17 00:00:00 2001 From: homuler Date: Mon, 28 Dec 2020 20:12:00 +0900 Subject: [PATCH] chore: deprecate some methods --- Assets/MediaPipe/SDK/Scripts/Format.cs | 1 + Assets/MediaPipe/SDK/Scripts/Framework/Formats/ImageFrame.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Assets/MediaPipe/SDK/Scripts/Format.cs b/Assets/MediaPipe/SDK/Scripts/Format.cs index 58c51c676..4cc66e422 100644 --- a/Assets/MediaPipe/SDK/Scripts/Format.cs +++ b/Assets/MediaPipe/SDK/Scripts/Format.cs @@ -51,6 +51,7 @@ public static NativeArray FromPixels32(Color32[] colors, int width, int he return pixelData; } + [Obsolete("FromBytePtr is deprecated, use Texture2D#LoadRawTextureData")] public static Color32[] FromBytePtr(IntPtr ptr, ImageFormat.Format format, int width, int height, int widthStep, bool isFlipped = false) { switch (format) { case ImageFormat.Format.SRGB: diff --git a/Assets/MediaPipe/SDK/Scripts/Framework/Formats/ImageFrame.cs b/Assets/MediaPipe/SDK/Scripts/Framework/Formats/ImageFrame.cs index 8435ce9eb..ac2777ac8 100644 --- a/Assets/MediaPipe/SDK/Scripts/Framework/Formats/ImageFrame.cs +++ b/Assets/MediaPipe/SDK/Scripts/Framework/Formats/ImageFrame.cs @@ -142,6 +142,7 @@ public float[] CopyToFloatBuffer(int bufferSize) { return CopyToBuffer(UnsafeNativeMethods.mp_ImageFrame__CopyToBuffer__Pf_i, bufferSize); } + [Obsolete("GetColor32s() is deprecated")] public Color32[] GetColor32s(bool isFlipped = false) { return Mediapipe.Format.FromBytePtr(MutablePixelData(), Format(), Width(), Height(), WidthStep(), isFlipped); }