Summary
AndroidBitmapTransform is an useful library to do Bitmap transformation on Android.
Current version : 1.0.0
How use it
It is very easy to get started with AndroidBitmapTransform:
Prototype
/**
* Method to create a Bitmap with the specified mode
* @param pDst the destination bitmap
* @param pSrc the source bitmap
* @param pMode the selected PorterDuff mode
* @param pScale true to scale source bitmap to destination
* @param pNewInstance boolean to indicate if this method can modify the Bitmap parameters
* @return the created bitmap
*/
public static Bitmap createBitmap(final Bitmap pDst, final Bitmap pSrc,
final PorterDuff.Mode pMode, final boolean pScale,
final boolean pNewInstance)
Multiplication of two bitmaps
ImageView view = (ImageView) findViewById(R.id.bitmapResult);
Bitmap bitmap = BitmapTransform.createBitmap(this,R.drawable.dst,
R.drawable.src, PorterDuff.Mode.MULTIPLY, true, false);
view.setImageBitmap(bitmap);
Addition of two bitmaps
ImageView view = (ImageView) findViewById(R.id.bitmapResult);
Bitmap bitmap = BitmapTransform.createBitmap(this,R.drawable.dst,
R.drawable.src, PorterDuff.Mode.ADD, true, false);
view.setImageBitmap(bitmap);
Fusion mode
##Maven
<dependency>
<groupId>com.github.devnied.AndroidBitmapTransform</groupId>
<artifactId>library</artifactId>
<version>1.0.0</version>
</dependency>
Useful links
Project link on GitHub: AndroidBitmapTransform