Name write_yuv Type Data Output Inputs Input Image 2D 4-vector byte field ( image ) Frame number Integer Parameters File path/name prefix string Filename integer precision integer slider Unix compress boolean Enable overwrite boolean Output yuv file Description Update from write abekas A60 This module includes the code from Terry Myerson for conversion of images to yuv format. Added are features wherein the user can name the file as with the animate filename module, but with a fixed (.yuv) suffix. Since these files are huge, the user has the choice of compressing the output, a la write_compressed_image. In some nets it may be desireable to allow or prevent overwriting of filenames. A switch is provided to allow overwriting of the yuv files, and if compressing, use of the /usr/ucb/compress -f option to force overwrite of the compressed file. General This module was intended to be used with the AVS Animator application. The module needs image and an integer input. It accepts images, one at a time. The image is then converted into the Abekas A60 yuv format - with the same dimensions of the Abekas A60 yuv format - and outputted to a file with name (path) as below. If the image is not the same size as the A60 image standard, then the AVS image is centered within the view of the Abekas. This works well when you consider the degradation of the image borders on its path to NTSC. The file path/name is concatenated from the filename prefix parameter string, the integer input padded as per the precision parameter, and ".yuv" or ".yuv.Z" suffix depending on if compress is enabled. For example: with file path/name prefix set to "/u/data/image" integer input = "1", precision set to "4", and compress enabled, the file /u/data/image.0001.yuv.Z is created. With the animate integer module feeding sucessive integers to it, the output file will be named sequentially with prefix, number and suffix. If overwrite is enabled, writing occurs when (and anytime that) file path string is present, and both an int and a 2D 4-vector field are on its input ports, with any updated. With overwrite off, writing occurs when the filename (prefix, or integer input) is changed. With unix compress enabled, output is compressed in situ. Note that with overwrite enabled, the -f option is passed to compress to force overwrite of an existing file. With overwrite off, compress will ask on the console if an attempts is made to save to a previously existing filename. This module was adpated from Ian Currington's write_abekas module and Abekas Inc.'s sample to_yuv program in their manual. It writes out a temporary file in between conversions. Examples - A network to copy a sequence of saved compressed images to the Abekas yuv format with prefix.number.suffix filenames. animate integer | |____________________ | | | animate filename | | | read compressed | ______________| | | write yuv ( image ports connected, and integer ports connected )