I wanted to know the way to convert the color image (which i am downloading from net) to black and white when i am displaying it to the user in android. can anybody found
Use the built-in methods:
public static Bitmap toGrayscale(Bitmap srcImage) {
Bitmap bmpGrayscale = Bitmap.createBitmap(srcImage.getWidth(), srcImage.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmpGrayscale);
Paint paint = new Paint();
ColorMatrix cm = new ColorMatrix();
cm.setSaturation(0);
paint.setColorFilter(new ColorMatrixColorFilter(cm));
canvas.drawBitmap(srcImage, 0, 0, paint);
return bmpGrayscale;
}