0

I have an android application which allows the user to take a picture using the phone camera. Further more I want to edit the photo that I've taken.I don't wanna do complicated operations on it, just something predifened.Some kind of logo at the bottom of the picture!!

Can someone point me in the right direction,please?

adrian
  • 4,574
  • 17
  • 68
  • 119

1 Answers1

2

You can use the camera class to take a picture. There is a detailed explanation on how to use it here:

To take pictures using Camera class, do the following steps:

  1. Obtain an instance of Camera from open(int).
  2. Get existing (default) settings with getParameters().
  3. If necessary, modify the returned Camera.Parameters object and call setParameters(Camera.Parameters).
  4. If desired, call setDisplayOrientation(int).
  5. Important: Pass a fully initialized SurfaceHolder to setPreviewDisplay(SurfaceHolder). Without a surface, the camera will be unable to start the preview.
  6. Important: Call startPreview() to start updating the preview surface. Preview must be started before you can take a picture.
  7. When you want, call takePicture(Camera.ShutterCallback, Camera.PictureCallback, Camera.PictureCallback, Camera.PictureCallback) to capture a photo. Wait for the callbacks to provide the actual image data.
  8. After taking a picture, preview display will have stopped. To take more photos, call startPreview() again first.
  9. Call stopPreview() to stop updating the preview surface.
  10. Important: Call release() to release the camera for use by other applications. Applications should release the camera immediately in onPause() (and re-open() it in onResume()).

takePicuture will give you a jpeg image and then you can add your watermark. For that look into Canvas.drawBitmap with alpha channel.

Caner
  • 57,267
  • 35
  • 174
  • 180
  • I was asking for some answer like this:http://stackoverflow.com/questions/2739971/overlay-two-images-in-android-to-set-an-imageview – adrian Jul 22 '11 at 10:41
  • I started the camera using an intent.Though the pictures taken are displayed horizontally!Do you know how could I fix that? – adrian Jul 22 '11 at 10:42
  • Maybe this can help" `http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation%28int%29` – Caner Jul 22 '11 at 12:18