Interface: Frame
A single frame, as seen by the camera. This is backed by a C++ HostObject wrapping the native GPU buffer. At a 4k resolution, a Frame can be 1.5MB in size.
Example
const frameProcessor = useFrameProcessor((frame) => {
'worklet'
console.log(`Frame: ${frame.width}x${frame.height} (${frame.pixelFormat})`)
}, [])
Properties​
bytesPerRow​
• Readonly
bytesPerRow: number
Returns the amount of bytes per row.
Defined in​
Frame.ts:33
height​
• Readonly
height: number
Returns the height of the frame, in pixels.
Defined in​
Frame.ts:29
isMirrored​
• Readonly
isMirrored: boolean
Returns whether the Frame is mirrored (selfie camera) or not.
Defined in​
Frame.ts:41
isValid​
• Readonly
isValid: boolean
Whether the underlying buffer is still valid or not.
A Frame is valid as long as your Frame Processor (or a runAsync(..)
operation) is still running
Defined in​
Frame.ts:21