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
  • 187,060
  • 113
  • 301
  • 369
png
  • 4,368
  • 7
  • 69
  • 118

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
  • 127,700
  • 71
  • 241
  • 295
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
  • 943
  • 1
  • 7
  • 17