Companion

public class Companion

Properties

Link copied to clipboard
public final static ImageUtil.Companion INSTANCE

Functions

Link copied to clipboard

Convert a bitmap to a byte array

Link copied to clipboard
public final Bitmap byteArray2Bitmap(ByteArray byteArray)

Convert a byte array to a bitmap

Link copied to clipboard
private final Bitmap createBitmapFromRGBA(ByteArray bytes, Integer width, Integer height)

Create a bitmap from an RGBA byte array

Link copied to clipboard
public final Bitmap getBitmapFromUri(ContentResolver contentResolver, Uri uri)
Link copied to clipboard
public final Bitmap getCenterCropBitmap(Bitmap imageBitmap, Boolean isFrontCamera)

Get a square center crop bitmap from a bitmap

public final Bitmap getCenterCropBitmap(ImageProxy image, Boolean isFrontCamera)

Get a square center crop bitmap from an ImageProxy

Link copied to clipboard
private final Bitmap imageProxyToBitmap(ImageProxy image, Boolean isFrontCamera)

Convert an ImageProxy to a Bitmap

Link copied to clipboard
private final Bitmap rotateBitmap(Bitmap bitmap, Float degrees, Boolean isFrontCamera)

Rotate a bitmap

Link copied to clipboard
private final ByteArray toByteArray(ByteBuffer $self)

Convert a ByteBuffer to a ByteArray