rotateAndCompressJpgFrame

fun rotateAndCompressJpgFrame(frame: Frame, rotationDegrees: Int, quality: Int, redactionRects: List<Rect> = emptyList()): ByteArray

Encodes a JPEG image using a Frame as source while adjusting the image for rotation, quality and redaction.

Parameters

frame

The RGBA or GRAY format frame to use as source to encode the jpeg.

rotationDegrees

The rotation degrees to apply to the final jpeg.

quality

The desired JPEG quality in a range of 0-100.

redactionRects

The list of rectangles to redact in the final jpeg.