Overlay images onto Camera preview SurfaceView

后端 未结 5 862
挽巷
挽巷 2020-11-28 02:51

I have a SurfaceView that is being used to draw images, and I would like to overlay them onto a live-feed from the phone\'s camera.

Currently, the

5条回答
  •  情歌与酒
    2020-11-28 03:34

    Just found a slightly strange aftershock from upgrading my handset to 4.0.4. I have a translucent gl whole screen overlay on a whole screen camera preview, which worked quite happily on an earlier ics build (I think it was 4.0.3, but not certain). After upgrading to 4.0.4, the preview went a bit haywire, with the camera image showing psychedelic primary areas of colour on any of the brighter parts of the camera image (darker parts looked OK). Eventually found that changing glclearcolour to 0,0,0,0 from 0.5, 0.5, 0.5. 0 sorted it out.

    It seems that even though the alpha was zero on the unused parts of the gl overlay, the blending function was still taking account of the grey gl background.

提交回复
热议问题