UtilsKt
public final class UtilsKt
Summary
Public methods |
|
|---|---|
static final boolean |
saveToFile(Utility function to save a bitmap onto the given |
static final boolean |
saveToFile(Utility function to save a bitmap onto the given |
Public methods
saveToFile
public static final boolean saveToFile(
@NonNull Bitmap receiver,
@NonNull File file,
@NonNull Bitmap.CompressFormat compressFormat,
int quality
)
Utility function to save a bitmap onto the given file.
| Parameters | |
|---|---|
@NonNull File file |
the file to store the bitmap. |
@NonNull Bitmap.CompressFormat compressFormat |
the |
int quality |
the quality for the compression. This is always 100 for png. |
| Returns | |
|---|---|
boolean |
whether the bitmap was correctly saved onto a file. |
saveToFile
public static final boolean saveToFile(
@NonNull Bitmap receiver,
@NonNull ParcelFileDescriptor parcelFileDescriptor,
@NonNull Bitmap.CompressFormat compressFormat,
int quality
)
Utility function to save a bitmap onto the given parcelFileDescriptor.
| Parameters | |
|---|---|
@NonNull ParcelFileDescriptor parcelFileDescriptor |
the file descriptor pointing to a file to store the bitmap. |
@NonNull Bitmap.CompressFormat compressFormat |
the |
int quality |
the quality for the compression. This is always 100 for png. |
| Returns | |
|---|---|
boolean |
whether the bitmap was correctly saved onto a file. |