Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set camera for monochrome (black and white) images only?

Tags:

android

How to set the camera for only black and white images? In my program I am using

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

for taking images.

like image 839
ravi Avatar asked Sep 06 '25 05:09

ravi


1 Answers

The modes like scene modes or the color effects, once the camera interface is open and ready to use. You can use the Camera.Parameters to set the mode once the camera is up. You can use the EFFECT_MONO(monochrome) from the color effects to get black & white images...

The below code snippet shows on how to use it,

    mCameraDevPara.setColorEffect(android.hardware.Camera.Parameters.EFFECT_MONO);
    mCameraDev.setParameters(mCameraDevPara);
like image 158
Deepak Avatar answered Sep 10 '25 13:09

Deepak