fromVideoFrame
expect fun fromVideoFrame(frame: Any, rotation: ImageRotation = ImageRotation.ROTATION_0, flip: ImageFlip = ImageFlip()): LiteRtImage
Creates a LiteRtImage from a platform-specific video frame or image object.
On Android: Expects android.media.Image or androidx.camera.core.ImageProxy.
On iOS: Expects platform.CoreVideo.CVPixelBufferRef.
On JVM: Expects java.awt.image.BufferedImage or java.nio.ByteBuffer.
On Web: Expects org.w3c.dom.HTMLCanvasElement or org.w3c.dom.HTMLImageElement or org.w3c.dom.HTMLVideoElement.
Return
A LiteRtImage.
Parameters
frame
The platform-specific frame object.
rotation
The rotation to apply.
flip
The flipping to apply.
Throws
If the frame type is not supported on the current platform.