Reputation: 831
So if the user takes a photo in color, I want to save it as a black and white picture.
Could someone help me?
Upvotes: 0
Views: 1514
Reputation: 34380
cameraParams.getSupportedColorEffect();
and check if it containsParameters.EFFECT_MONO
then set
cameraParams.setColorEffect(android.hardware.Camera.Parameters.EFFECT_MONO);
mCamera.setParameters(cameraParams);
Upvotes: 0
Reputation: 3598
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.");
}
Upvotes: 0