Android Question How to copy a square section of bitmap and paste it back in diamond shape

Elton Leung

Member
Licensed User
Longtime User
Dear all,

What I like to do is to copy a square section from a bitmap and paste it back(or some where else) in a diamond shape. Very much like the attached picture. Can someone please point me to a library / tutorial / sample for me to start?

Thanks advance for your help.

Elton


image%20distortion.jpg
 

Johan Schoeman

Expert
Licensed User
Longtime User
Upvote 0

Elton Leung

Member
Licensed User
Longtime User
Here is one possible solution if you are using B4A V4.3 or later. It makes use of inline Java code and you can define your own path in the Java code that will be clipped.

https://www.b4x.com/android/forum/t...-star-imageviews-with-inline-java-code.51639/


Thank you for your reply but it doesn't seem like what I needed. I am NOT looking for a way to clip a bitmap in different shape, I need the bitmap in the square shape to warp according to the boundary.
 
Last edited:
Upvote 0
Top