ipcam-view icon indicating copy to clipboard operation
ipcam-view copied to clipboard

How to convert output of ipcam-view to Bitmap?

Open MhmudAlpurd opened this issue 4 years ago • 1 comments

Hi @niqdev, thank you for this library. I need to use the output of ipcam-view as bitmap. Could you guide me on how to do it, please?

MhmudAlpurd avatar Mar 01 '22 11:03 MhmudAlpurd

What I explored that might work is using the onFrameCapturedListener object, sample code as follow:

    val view: MjpegSurfaceView = binding.mjpegView
    view.setOnFrameCapturedListener(object: OnFrameCapturedListener {
        override fun onFrameCaptured(bitmap: Bitmap) {
            // do you action here
            Log.i("this","hihi")
        }
        override fun onFrameCapturedWithHeader(bitmap: ByteArray, header: ByteArray) {
            // do you action here
            Log.i("this","hihi2")
        }
    })

witti-stephen avatar Nov 03 '22 08:11 witti-stephen