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 ByteArray createQRCodeJpeg(ByteArray rawBytes)
Link copied to clipboard
public final Bitmap getBitmapFromUri(ContentResolver contentResolver, Uri uri)
Link copied to clipboard
public final Bitmap getCenterCropBitmap(Bitmap bitmap, 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 ByteArray toByteArray(ByteBuffer $self)

Convert a ByteBuffer to a ByteArray