Sander
Sander

Reputation: 73

Camera with transparency margin

I need a camera function on my App. This is what I need:

enter image description here (From barcode-scanner but I need something for making pictures)

I need a transparency margin. Now when I would press "shot photo" I need exactly this:

enter image description here

Someone know a tool like that?

Thanky in advance.

Upvotes: 1

Views: 149

Answers (1)

Cruceo
Cruceo

Reputation: 6834

You're going to have to map that out yourself and crop the bitmap.

You can draw the boundaries of the transparency window on the Canvas of the FrameLayout your camera's view.

From there, you grab the position of the transparency window in relation to the screen and then use those boundaries to cut out the desired area from the bitmap returned by the camera.

Upvotes: 1

Related Questions