am using camera2 api to capture multiple images as one and after that i save the image and creating a panorama images
private Bitmap combineImageIntoOne(ArrayList<Bitmap> bitmap) {
int w = 0, h = 0;
for (int i = 0; i < bitmap.size(); i++) {
if(i < bitmap.size() - 1){
h = bitmap.get(i).getHeight() > bitmap.get(i + 1).getHeight() ? bitmap.get(i).getHeight() : bitmap.get(i + 1).getHeight();
}
w += bitmap.get(i).getWidth();
}
Bitmap temp = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(temp);
float aspectRatio = 0;
int side = 0;
int width = 0;
for (int i = 0; i < bitmap.size(); i++) {
Log.d("HTML", "Combine: "+i+"/"+bitmap.size()+1);
side = (i == 0 ? 0 : side+bitmap.get(i).getWidth());
canvas.drawBitmap(bitmap.get(i), 0f, side, null);
}
return temp;
}
scaling it down become more difficult does any one have an idea how I can dealt with horizontal image merge with 20 items?What code did you use to resolve this problem?