BlurTransformation

@RequiresApi(value = 18)
class BlurTransformation @JvmOverloads() constructor(context: Context, radius: Float, sampling: Float) : Transformation

A Transformation that applies a Gaussian blur to an image.

Parameters

context

The Context used to create a RenderScript instance.

radius

The radius of the blur.

sampling

The sampling multiplier used to scale the image. Values 1 will downscale the image. Values between 0 and 1 will upscale the image.

Constructors

BlurTransformation
Link copied to clipboard
fun BlurTransformation(context: Context, radius: Float = DEFAULT_RADIUS, sampling: Float = DEFAULT_SAMPLING)
The Context used to create a RenderScript instance.

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
key
Link copied to clipboard
open override fun key(): String
Return a unique key for this transformation.
toString
Link copied to clipboard
open override fun toString(): String
transform
Link copied to clipboard
open suspend override fun transform(pool: BitmapPool, input: Bitmap, size: Size): Bitmap
Apply the transformation to input and return the transformed Bitmap.