App State right now
I am making an app in which i want the background scenery/picture to be visible in the black sketch only and the reset of the part of the image should stay opaque. Right now i have made front Imageview transparent to some value but that is not what i want ,i want to change the opacity of black pixels only.
ImageView frontImageView = findViewById(R.id.image);
Bitmap front = BitmapFactory.decodeResource(getResources(),
R.drawable.front);
front=GrayscaleToBin(front);
front.setHasAlpha(true);
frontImageView.setImageBitmap(front);
imageView.setImageAlpha(150);
i have searched a lot but couldn't find a solution to this problem. Any help is appreciated.