natario1 / CameraView

📸 A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing all of the common issues and needs. Real-time filters, gestures, watermarks, frame processing, RAW, output of any size.
https://natario1.github.io/CameraView
Other
4.94k stars 932 forks source link

Flash Bug #1267

Closed Shahidzbi4213 closed 8 months ago

Shahidzbi4213 commented 8 months ago

Flash Auto and Flash On is not working with camera2.

Picture/Video using snapShotApi

Device Redmi Note 12 Android Version 14

EzequielAdrianM commented 8 months ago

Hi, if you use the Picture Snapshot and Video Snapshot, it is taking a screenshot directly from the OpenGL surface. This means that photo and video are taken much faster, but the Android camera was never actually ordered to take anything, thats why you see no flash. If you want all the camera functionalities you must use the takePicture and recordVideo (no snapshot) versions.

Shahidzbi4213 commented 8 months ago

Thanks buddy for clearing that up but that also means with takePicture()/Video we will not be - able to show the watermark.

EzequielAdrianM commented 8 months ago

According to the documentation watermark only works when using snapshot. Anyway, you can manually attach your watermark(bitmap) overlay into the picture using a canvas. And for watermark in video I highly recommend using LiTr. We use it in production for overlay bitmap, gif, and stickers in our videos and works like a champ.