0

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.

Ramesh sambu
  • 3,577
  • 2
  • 24
  • 39
Asim Khan
  • 51
  • 6

1 Answers1

0

I would recommend to make changes in original image from some other tools such as Paint or Photoshop etc and then load image in app.

Since making changes on current image which you are having will again take some time to load unnecessary.

Better process image in other 3rd party tool and use as it is in app.

Nikhil Lotke
  • 605
  • 7
  • 15