yuv2image is an open source tool for converting YUV format file to image file(i.e. jpg/bmp/png).
A precompiled Windows binary of yuv2image can be downloaded from the downloads page.
Currently yuv2image supports the following YUV pixel formats:
Format | Value | Description |
---|---|---|
Y800 | 0 | Simple, single Y plane for monochrome images. |
I420 | 1 | 8 bit Y plane followed by 8 bit 2x2 subsampled U and V planes. |
I444 | 2 | 8 bit Y plane followed by 8 bit U and V planes, chroma planes U and V are not sub-sampled. |
NV21 | 3 | 8-bit Y plane followed by an interleaved U/V plane with 2x2 subsampling. |
NV12 | 4 | As NV12 with U and V reversed in the interleaved plane. |
Invoke yuv2image from command line, usage:
yuv2image <YUV file> <image file> <format {0,1,2,3,4}> <width> <height> <stride>
e.g. to convert a nv21 YUV pixel format file to jpg:
$ ./yuv2image 4032x3024_nv21.yuv output.jpg 3 4032 3024 4032