LEADTOOLS Support
General
General Questions
Xamarin Android - The most efficient way going from android Nv21 to RasterImage?
#1
Posted
:
Wednesday, November 14, 2018 5:04:00 AM(UTC)
Groups: Registered
Posts: 23
Thanks: 2 times
Hi,
I was wondering if there's a better way and more efficient way of going from the android camera video preview format nv21 to a RasterImage instance?
I'm currently creating a YuvImage instance, then calling CompressToJpeg into a MemoryStream. I then pass that stream into RasterCodecs.Load. Is there a way for me to take the Nv21 buffer directly from the Android camera and get a RasterImage skipping the YuvImage and CompressToJpeg call?
Solved:
I was able ot get the RasterImage.CreateFromYUVData method working. Instead of passing in the NV21 bitsPerPixel value which is 12, I passed in a desired bitsPerPixel for the output/resulting image, since the documentation states that 8, 24 or 32 are the only acceptable values.
Edited by user Wednesday, November 14, 2018 11:54:33 AM(UTC)
| Reason: Not specified
LEADTOOLS Support
General
General Questions
Xamarin Android - The most efficient way going from android Nv21 to RasterImage?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.