Skip to content

Instantly share code, notes, and snippets.

@sharish
Created July 25, 2015 04:38
Show Gist options
  • Save sharish/c04d7af48e06b4312514 to your computer and use it in GitHub Desktop.
Save sharish/c04d7af48e06b4312514 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)
.setAngle(angle)
.merge();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment