Class Frame
- java.lang.Object
-
- com.azure.android.ai.vision.common.Frame
-
- All Implemented Interfaces:
AutoCloseable
public final class Frame extends Object implements AutoCloseable
Frame class Note: close() must be called in order to release underlying resources held by the object.
-
-
Constructor Summary
Constructors Constructor Description Frame(ByteBuffer buffer)
Constructs an instance of Frame from given byte buffer.Frame(ByteBuffer buffer, FrameFormat frameFormat)
Constructs an instance of Frame from given byte buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Explicitly frees any external resource attached to the objectByteBuffer
getData()
Get the byte buffer associated with the frame.PropertyCollection
getProperties()
Get the collection of additional frame properties.
-
-
-
Constructor Detail
-
Frame
public Frame(ByteBuffer buffer)
Constructs an instance of Frame from given byte buffer.- Parameters:
buffer
- The byte buffer containing pixels of the frame
-
Frame
public Frame(ByteBuffer buffer, FrameFormat frameFormat)
Constructs an instance of Frame from given byte buffer.- Parameters:
buffer
- The byte buffer containing pixels of the frameframeFormat
- The frame format
-
-
Method Detail
-
getProperties
public final PropertyCollection getProperties()
Get the collection of additional frame properties.- Returns:
- A property collection instance
-
getData
public final ByteBuffer getData()
Get the byte buffer associated with the frame.- Returns:
- The buffer
-
close
public final void close()
Explicitly frees any external resource attached to the object- Specified by:
close
in interfaceAutoCloseable
-
-