YUV frame to image example?
Posted: 2011-05-20T07:38:56-07:00
I understand that it should be possible to:
0) Fill a raw data buffer with some a frames worth of values (say a YUV422 planar or interleaved buffer)
1) Create a YUV blob from the raw data buffer.
2) Create an image from the blob.
I have not managed to get this to work, or find any info how it should be done. Step 2 always errors ("unexpected end of file") probably because the image expect the YUV blob to be in some undocumented format that I don't know about. Could someone who knows better, create a quick example or pseudo-code to show how this should be done.
If I cant get this working I will have to ditch trying to create a YUV blob, and do the YUV buffer to RGB pixel buffer conversions myself and then pass the pixel buffer to the Image constructor.. but I'd rather not do this as that will be inefficient and IM must know how to do these YUV to RGB conversions.
The same question was asked about five years ago but unfortunately no example solution was given: viewtopic.php?f=1&t=8796
Thanks
0) Fill a raw data buffer with some a frames worth of values (say a YUV422 planar or interleaved buffer)
1) Create a YUV blob from the raw data buffer.
2) Create an image from the blob.
I have not managed to get this to work, or find any info how it should be done. Step 2 always errors ("unexpected end of file") probably because the image expect the YUV blob to be in some undocumented format that I don't know about. Could someone who knows better, create a quick example or pseudo-code to show how this should be done.
If I cant get this working I will have to ditch trying to create a YUV blob, and do the YUV buffer to RGB pixel buffer conversions myself and then pass the pixel buffer to the Image constructor.. but I'd rather not do this as that will be inefficient and IM must know how to do these YUV to RGB conversions.
The same question was asked about five years ago but unfortunately no example solution was given: viewtopic.php?f=1&t=8796
Thanks