Share

imgcvt

Purpose

The Imgcvt utility converts images or a sequence of images from one image format to another.

Description

In any shell window, enter imgcvt followed by the name of the image that you want to convert. The input and output image formats are usually determined by the filename extension or image content. However, when the input or output image has no extension, or cannot be identified, the -f and -t options can be used to indicate the desired formats. You can use the following options.

imgcvt <options> input_image output_image

Example 1

imgcvt -f sgi -t tiff input_image output_image

This line converts the image named input_image that is in the Silicon Graphics format to the TIFF format and saves the image out to a different name, output_image.

Example 2

imgcvt -f tiff -t iff input_image output_image

This line converts a TIFF image to the IFF file format.

The following table lists the imgcvt options.

Command line optionsDescription
-f input_image_extensionIdentifies the specific image format that you are converting from. For example,-f sgi means that only files matching the Silicon Graphics image format are accepted as input.
-t output_image_extensionIdentifies the specific image format that you are converting to. For example -t tiffmeans that files will be converted to the TIFF image format only.
-n start end stepIs the start, end and step of an input image sequence (only whole numbers are accepted).
-N start end stepIs the start, end and step of an output image sequence (only whole numbers are accepted).
-r rangeIn an input image sequence, selects the range of images to be converted from. For example:imgcvt -r 1-5 ...imgcvt -r 1-5x2 ...imgcvt -r 1-5,10-20x2,50 ...A sequence specifier is a list of single frames or ranges separated by a comma or a slash. In this example, they are individual, numbered files. For each range, an optional step can be specified after an x.Sequences can be reversed and offsets can be added to the input or output frame number:imgcvt -r 100-1 -R 1-100 in.#.rgb out.#.rlaimgcvt -r 1-100 in.#.rgb out.#+100.rla
-R rangeIn an output image sequence, selects the range of images to be converted to.
-hProvides a brief description of each option.
-sSilent mode.
-vVerbose mode.
-V pal/ntscVideo mode for yuv files.
-C compressTIFF compression types: LZW (the default) or NONE.
-q NJPEG quality (0...100; default is 75).
-mExplore map format.

When you are working on a sequence of images, the # and @ symbols refer to the current frame number:

  • The hash (#) indicates a four-digit padded number,
  • whereas the @ symbol indicates a non-padded number.

The following converts a sequence of 100 frames:

imgcvt -n 1 100 1 image_in.iff.@ image_out.#.rla

For more precise control of the frame number format, use either multiple @ symbols to set a specific padding or the standard printf(3S) notation:

imgcvt -n 1 100 1 image_in.@@@.rgb image_out.#.rla imgcvt -n 1 100 1 image_in.%03d.rgb image_out.#.rla imgcvt -n 1 100 1 image_in.%.2f.rgb image_out.#.rla

Using image filename extensions

Use the following filename extensions to convert images from one image format to another.

  • In the -f option, you specify the extension of the image format that you are converting from.

  • In the -t option, you specify the extension of the image format that you are converting to.

    Image FormatExtension
    Abekas NTSC or PAL.yuv
    Alias.als
    Explore 
    GIF.gif
    JPEG.jpg
    Kodak Cineon.cin
    Lucas Film.lff
    Maya IFF.iff
    Pixibox PXB.pxb
    PXN 
    PPM raw/ascii.ppm
    Prisms.pri
    Quantel.qtl
    SGI.rgb, .sgi or .bw
    Softimage.pic
    Targa RGB/BW.tga
    TIFF 6.0.tif or .tiff
    Vista.vst
    Wavefront RLA.rla
    Windows bitmap.bmp

Was this information helpful?