任何人都可以参考任何教程,在Android上的SD卡上拍摄的图像上写文字
答案 0 :(得分:0)
您可以将EditText和Write放入其中,写完后首先将其转换为Bitmap,如
位图bmp = Bitmap.createBitmap(mEditText.getDrawingCache()); 现在您可以将创建的图像bmp添加到原始图像中,如下所示
这样调用:位图合并= combineImages(bgBitmap,bmp);
public Bitmap combineImages(Bitmap background, Bitmap foreground) {
int width = 0, height = 0;
Bitmap cs;
width = getWindowManager().getDefaultDisplay().getWidth();
height = getWindowManager().getDefaultDisplay().getHeight();
cs = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas comboImage = new Canvas(cs);
background = Bitmap.createScaledBitmap(background, width, height, true);
comboImage.drawBitmap(background, 0, 0, null);
comboImage.drawBitmap(foreground, matrix, null);
return cs;
}
答案 1 :(得分:0)
使用布局环绕图像..然后将文本视图添加到相同的布局