I have tried to implement the image overlay on the live video using native camera. The code is as follows:
if (bmp != null)
{
Canvas canvas = mHolder.lockCanvas();
if (canvas != null)
{
canvas.drawBitmap(bmp, (canvas.getWidth() - bmp.getWidth()) / 2,(canvas.getHeight() - bmp.getHeight()) / 2, null);
canvas.drawBitmap(drawable,0,0, null);
mFps.draw(canvas, (canvas.getWidth() - bmp.getWidth()) / 2, 0);
mHolder.unlockCanvasAndPost(canvas);
}
bmp.recycle();
}
But when I run the program it says force close. The image size I'm using is 751 x 500. Any suggestions, please? (Or any alternative approach?)
Thanks in advance for the input.