YUVIT is open source command line tool that can convert images into YUV sequences or streams. This tool has two major benefits: wide formats support for output yuv images and wide formats support for input images.
This tool was started in far 2005 and was released as any2yuv on Sourceforge in 2006. It was based on Corona open source imaging library which development has been stopped in far-far 2003. I didn't maintained any2yuv since it was released, therefore it missed functionality and some bugs. But in 2011 I got several requests and bug reports about this tool. After that was decided to rewrite this tool from scratch.
Meet the YUVIT for Mac, Windows and Linux. It's simply better then its predecessor. Now YUVIT uses FreeImage library, which provides support for tens image codecs like jpeg, tiff, png, pcx, bmp, gif and so on.
yuvit [options] [-f format] [-s uvscale] <InFile> [OutFile]
Options:
-a : Add new image to the end of output file. Don't truncate output file.
-m <start>:<end> : Multiple file input. Where:
start : Sequence start
end : Sequence end
-i : Interleave UV rows for planar formats
-w : Swap UV components order
Formats (-f option):
yuv : Planar format [DEFAULT]
yuyv : Packed format
uyvy : Packed format
yyuv : Planar packed chroma format
UV scales (-s option. Used only with -f and planar formats):
h1v1 : UV not scaled down [DEFAULT]
h2v2 : UV scaled down by 2x horizontally and vertically
h2v1 : UV scaled down by 2x horizontally
h1v2 : UV scaled down by 2x vertically
Note: Use symbol '#' in file names for enumerators.
Examples:
yuvit -a -m 0:100 test###.bmp out.yuv
Convert images from 'test000.bmp' to 'test100.bmp' into single 'out.yuv' file
yuvit -m 10:200 test######.jpg out###.yuv
Convert images 'test000010.jpg'...'test000200.jpg' into files 'out010.yuv'...'out200.yuv'
Here are examples of how 4x4 pixels image can be stored in YUV format depending on options (not all possible cases are shown).
-
-f yuv -s h1v1 [Default]
YYYY YYYY UUUU UUUU VVVV VVVV
-
-f yuv -s h2v1
YYYY YYYY UU UU VV VV
-
-f yuv -s h1v2
YYYY YYYY UUUU VVVV
-
-f yuv -s h2v1 -i
YYYY YYYY UUVV UUVV
-
-f yuyv
YUYVYUYV YUYVYUYV
-
-f uyvy
UYVYUYVY UYVYUYVY
-
-f yuyv -w
YVYUYVYU YVYUYVYU
-
-f yuv -s h2v1 -i -w
YYYY YYYY VVUU VVUU
-
-f yuv -s h1v1
YYYY YYYY UVUV
(c) 2005-2012 Alexander Shashkevych <alexander()stunpix.com>
YUVIT code is licensed under LGPL. Code of FreeImage and image codecs are distributed under their own licenses.