-
public final class ImagesKt
-
-
Method Summary
Modifier and Type Method Description final static BitmaploadImage(ImageLoader $self, Context context, Object data, Function1<ImageRequest.Builder, Unit> configurer)Load a Bitmap from a CoilImage loader. final static ResourceBuilders.ImageResourceloadImageResource(ImageLoader $self, Context context, Object data, Function1<ImageRequest.Builder, Unit> configurer)Load an ImageResource from a CoilImage loader. final static ResourceBuilders.ImageResourcetoImageResource(Bitmap $self)Convert a bitmap to a ImageResource. -
-
Method Detail
-
loadImage
final static Bitmap loadImage(ImageLoader $self, Context context, Object data, Function1<ImageRequest.Builder, Unit> configurer)
Load a Bitmap from a CoilImage loader.
- Parameters:
context- the context of the service or activity.data- the image to fetch in one of the support Coil formats such as String, HttpUrl.configurer- any additional configuration of the ImageRequest being built.
-
loadImageResource
final static ResourceBuilders.ImageResource loadImageResource(ImageLoader $self, Context context, Object data, Function1<ImageRequest.Builder, Unit> configurer)
Load an ImageResource from a CoilImage loader.
- Parameters:
context- the context of the service or activity.data- the image to fetch in one of the support Coil formats such as String, HttpUrl.configurer- any additional configuration of the ImageRequest being built.
-
toImageResource
final static ResourceBuilders.ImageResource toImageResource(Bitmap $self)
Convert a bitmap to a ImageResource.
Ensures it uses RGB_565 encoding, then generates an ImageResource with the correct width and height.
-
-
-
-