Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, November 14, 2018 5:04:00 AM(UTC)

Mikael  
Mikael

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

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.028 seconds.