Skip to content

Instantly share code, notes, and snippets.

@sharish
Last active August 29, 2015 14:24
Show Gist options
  • Save sharish/b1045b3b25d7b72e12ce to your computer and use it in GitHub Desktop.
Save sharish/b1045b3b25d7b72e12ce to your computer and use it in GitHub Desktop.
int angle = 90; // your angle here
float scale = 0.5f; // scaling option for merging the image
Bitmap baseBitmap; // your base bitmap here
Bitmap mergeBitmap; // your merging bitmap here
ImageView imgView; // your image view for displaying the merged bitmaps.
BitmapMergerTask task = new BitmapMergerTask();
task.setBaseBitmap(baseBitmap)
.setMergeBitmap(mergeBitmap)
.setMergeListener(new BitmapMergerTask.OnMergeListener() {
@Override
public void onMerge(BitmapMergerTask task, Bitmap mergedBitmap) {
if(imgView != null) {
imgView.setImageBitmap(mergedBitmap);
}
}
})
.setScale(scale)
.merge();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment