2

I have two images in my Drawable folder.

I want to mask image1 with image2 so that I get round edges for image1.

How can I achieve this? I saw some solutions with bufferedimage and getRGB.Is there any easier solution?

Janusz
  • 182,484
  • 112
  • 300
  • 368
png
  • 4,308
  • 7
  • 63
  • 114

2 Answers2

1
  1. Take ImageView
  2. Set the border/frame 9-patch image as android:background
  3. Now set the actual image to the ImageView as android:src

Example of 9-patch frame:

enter image description here

Paresh Mayani
  • 125,853
  • 70
  • 238
  • 294
0

You can try to directly create an rounded corners ImageView following the code from here How to make an ImageView with rounded corners?

Community
  • 1
  • 1
Dany's
  • 935
  • 1
  • 7
  • 17