0

So if the user takes a photo in color, I want to save it as a black and white picture.

Could someone help me?

Tim Post
  • 33,371
  • 15
  • 110
  • 174
SAM Bhadani
  • 831
  • 2
  • 10
  • 13

3 Answers3

2

you have to set camera parameter by see parameter

Sunil Pandey
  • 7,042
  • 7
  • 35
  • 48
0

cameraParams.getSupportedColorEffect(); and check if it contains Parameters.EFFECT_MONO then set

cameraParams.setColorEffect(android.hardware.Camera.Parameters.EFFECT_MONO);

mCamera.setParameters(cameraParams);
Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300
0

If you've got a rather crappy phone (I do - Xperia X8), then you won't be able to apply any color effects at all. To find out what color effects are supported by your phone, you could use something like this:

Camera.Parameters params = cam.getParameters();

try {           
    for (String e : params.getSupportedColorEffects()) {
        Log.d(TAG, "Effect: " + e);
    }
}
catch (NullPointerException npe) {
    Log.d(TAG, "No color effects supported by this camera.");           
}
rdoubleui
  • 3,554
  • 4
  • 30
  • 51