public class TransparentJpeg
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
combinationExists(java.io.File dir,
java.lang.String filename,
boolean cleanupIfNot)
Check if the RGB and ALPHA channel's exists
|
static Bitmap |
combineColorWithMask(Bitmap rgbBitmap,
Bitmap maskBitmap)
Load the RGB and ALPHA channel and combine them into one Bitmap.
|
static void |
deleteTransparentJpeg(java.io.File dir,
java.lang.String filename)
Delete the RGB and ALPHA Jpeg.
|
static Bitmap |
loadTransparentJpeg(java.io.File dir,
java.lang.String filename)
Load the RGB and ALPHA channel and combine them into one Bitmap.
|
static boolean |
saveTransparentJpeg(java.io.File dir,
java.lang.String filename,
Bitmap bitmap)
Save ARGB Bitmap in two JPEG files
|
public static boolean combinationExists(java.io.File dir, java.lang.String filename, boolean cleanupIfNot)
dir
- save directoryfilename
- the filename prefixcleanupIfNot
- delete the second channel if the other not presentpublic static Bitmap combineColorWithMask(@NonNull Bitmap rgbBitmap, @NonNull Bitmap maskBitmap)
rgbBitmap
- RGB color informations ARGB_8888[COLOR + A=255]maskBitmap
- BW mask alpha informations ARGB_8888[(R=G=B + A=255)]public static void deleteTransparentJpeg(java.io.File dir, java.lang.String filename)
dir
- save directoryfilename
- the filename prefixpublic static Bitmap loadTransparentJpeg(java.io.File dir, java.lang.String filename)
dir
- save directoryfilename
- the filename prefixpublic static boolean saveTransparentJpeg(java.io.File dir, java.lang.String filename, Bitmap bitmap)
dir
- save directoryfilename
- the filename prefixbitmap
- the bitmap that should be saved