coil-base / coil.transform / Transformation / transform

transform

abstract suspend fun transform(pool:BitmapPool, input:Bitmap, size:Size):Bitmap

Apply the transformation to input.

For optimal performance, do not use Bitmap.createBitmap inside this method. Instead, use the provided BitmapPool to get new Bitmaps. Also, you should return every bitmap except the output bitmap to pool so that they can be reused.

Parameters

pool - A BitmapPool which can be used to request Bitmap instances.

input - The input Bitmap to transform. Its config will always be Bitmap.Config.ARGB_8888 or Bitmap.Config.RGBA_F16.

size - The size of the image request.

See Also

BitmapPool.get

BitmapPool.put