网上有类似的软件,拍一张后,手机横向移动,再拍另一张,把两张图片无逢连接起来。
这种如何实现

解决方案 »

  1.   

    把两张图片合并
    public static Bitmap overlay(Bitmap bmp1, Bitmap bmp2) {
    int w=bmp1.getWidth();
    int h=bmp1.getHeight();
    int ww=bmp2.getWidth();
    int hh=bmp2.getHeight();
    Bitmap bmOverlay = Bitmap.createBitmap(w+ww,
    h, bmp1.getConfig());
    Canvas canvas = new Canvas(bmOverlay);
    canvas.drawBitmap(bmp1, new Matrix(), null);
    canvas.drawBitmap(bmp2, bmp1.getWidth(), 0, null);
    return bmOverlay;
    }