In an android app i have photo capture functionality using custom camera view.I am using SurfaceHolder.Callback and able to capture image.But now i want to display some text on that captured image. How to do this. below is my code -
preview.camera.takePicture(shutterCallback, rawCallback, jpegCallback);
and callback method -
PictureCallback jpegCallback = new PictureCallback() {
public void onPictureTaken(byte[] data, Camera camera) {
FileOutputStream outStream = null;
long time = 0;
try {
new File(filePath).createNewFile();
outStream = new FileOutputStream(filePath);
outStream.write(data);
captureBtn.setVisibility(View.GONE);
preview.shutdownCamera();
preview.setVisibility(View.GONE);
outStream.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
}
Log.d(TAG, "onPictureTaken - jpeg");
}
};
EDITED
I think my question is not clear,i want to add watermark on my captured image.Any help please.