Предположим, у меня есть портретный растровый рисунок, который я сделал с помощью моей фронтальной камеры. Как я могу обрезать растровое изображение в форме овальной формы наложения после того, как я сделал снимок? Овальная форма центрирована на экране. Овальная форма имеет фиксированную высоту и ширинуAndroid растровая обрезка овальной формы
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- camera viewfinder here which fits the whole screen-->
<RelativeLayout
android:id="@+id/cameraLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:paddingTop="10dp">
<!--Custom buttons-->
</RelativeLayout>
<RelativeLayout
android:id="@+id/record_panel"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@android:color/transparent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<!--Capture button-->
</RelativeLayout>
</RelativeLayout>
<!--the oval-shaped overlay-->
<ImageView
android:layout_width="210dp"
android:layout_height="318dp"
android:id="@+id/overlay"
android:layout_gravity="center"
android:src="@mipmap/oval" />
</FrameLayout>
Как вы решили это Kelok? –