RgbFilter
@UnstableApi
class RgbFilter : RgbMatrix
Provides common color filters.
This effect assumes a linear working color space.
Summary
Public functions |
|
|---|---|
java-static RgbFilter! |
Creates a new grayscale |
java-static RgbFilter! |
Creates a new inverted |
FloatArray<Float>! |
Returns the 4x4 RGB transformation |
BaseGlShaderProgram! |
toGlShaderProgram(context: Context!, useHdr: Boolean)Returns a |
Inherited functions |
||||
|---|---|---|---|---|
|
||||
|
Public functions
createGrayscaleFilter
java-static fun createGrayscaleFilter(): RgbFilter!
Creates a new grayscale RgbFilter instance.
createInvertedFilter
java-static fun createInvertedFilter(): RgbFilter!
Creates a new inverted RgbFilter instance.
getMatrix
fun getMatrix(presentationTimeUs: Long, useHdr: Boolean): FloatArray<Float>!
Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.
| Parameters | |
|---|---|
presentationTimeUs: Long |
The timestamp of the frame to apply the matrix on. |
useHdr: Boolean |
If |
| Returns | |
|---|---|
FloatArray<Float>! |
The |
toGlShaderProgram
fun toGlShaderProgram(context: Context!, useHdr: Boolean): BaseGlShaderProgram!
Returns a GlShaderProgram that applies the effect.
| Parameters | |
|---|---|
context: Context! |
A |
useHdr: Boolean |
Whether input textures come from an HDR source. If |
| Throws | |
|---|---|
androidx.media3.common.VideoFrameProcessingException |
If an error occurs while creating the |