takeJpegSnapshot
suspend fun IVideoInput.takeJpegSnapshot(filePathString: String, @IntRange(from = 0, to = 100) quality: Int = 100, @IntRange(from = 0, to = 359) rotationDegrees: Int = 0)
Takes a JPEG snapshot of the current video frame.
The snapshot is saved to the specified file.
Parameters
filePathString
The path of the file to save the snapshot to.
quality
The quality of the JPEG, from 0 to 100.
rotationDegrees
The rotation to apply to the snapshot, in degrees.
suspend fun IVideoInput.takeJpegSnapshot(file: File, @IntRange(from = 0, to = 100) quality: Int = 100, @IntRange(from = 0, to = 359) rotationDegrees: Int = 0)
Takes a JPEG snapshot of the current video frame.
The snapshot is saved to the specified file.
Parameters
file
The file to save the snapshot to.
quality
The quality of the JPEG, from 0 to 100.
rotationDegrees
The rotation to apply to the snapshot, in degrees.
suspend fun IVideoInput.takeJpegSnapshot(outputStream: OutputStream, @IntRange(from = 0, to = 100) quality: Int = 100, @IntRange(from = 0, to = 359) rotationDegrees: Int = 0)
Takes a snapshot of the current video frame.
The snapshot is saved as a JPEG to the specified output stream.
Parameters
outputStream
The output stream to save the snapshot to.
quality
The quality of the JPEG, from 0 to 100.
rotationDegrees
The rotation to apply to the snapshot, in degrees.