Skip to content

Commit

Permalink
chore: deprecate some methods
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Dec 28, 2020
1 parent ebbf0ed commit 01933ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Assets/MediaPipe/SDK/Scripts/Format.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static NativeArray<byte> 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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public float[] CopyToFloatBuffer(int bufferSize) {
return CopyToBuffer<float>(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);
}
Expand Down

0 comments on commit 01933ae

Please sign in to comment.