LinuxCommandLibrary

stream.im6

Convert, manipulate, and stream image formats

SYNOPSIS

stream [options] input-file [output-file]

PARAMETERS

-alpha type
    Specifies how to handle the alpha channel (e.g., 'on', 'off', 'set', 'copy').

-authenticate password
    Decrypts a password-protected image.

-channel type
    Selects which color channels to process (e.g., 'red', 'green', 'blue', 'alpha').

-clip
    Clips along the boundaries of a path defined in the clip path 'property'.

-colors integer
    Sets the preferred number of colors in the image.

-colorspace type
    Specifies the colorspace of the image (e.g., 'RGB', 'CMYK', 'Gray').

-compress type
    Specifies the compression type for the output image (e.g., 'JPEG', 'PNG', 'LZW').

-depth integer
    Specifies the color depth of the image (e.g., 8, 16, 32). Controls bits per pixel.

-extract geometry
    Extracts a rectangular region of the image.

-flip
    Creates a mirror image by reflecting the pixels across the horizontal axis.

-flop
    Creates a mirror image by reflecting the pixels across the vertical axis.

-format type
    Image file format type.

-grayscale intensity
    Make image grayscale.

-help
    Display help summary.

input-file
    The path to the input image file.

output-file
    The path to the output image file. If omitted, output is to standard output.

DESCRIPTION

The `stream` command is part of the ImageMagick suite, a powerful set of tools for manipulating images. It's specifically designed to read pixel data from one or more image files, process it, and then write it to another file or to standard output. `Stream` is particularly useful for converting between different image formats, adjusting pixel values, and extracting image subsets. Unlike many other ImageMagick commands that operate on entire images in memory, `stream` can handle very large images efficiently by processing them in smaller chunks. This makes it suitable for tasks involving gigapixel images or other memory-intensive operations. It supports a wide range of input and output formats and offers options to control the pixel storage order, color depth, and image dimensions. Common uses include converting RAW image data, generating thumbnails, and performing basic image analysis. The command is typically used in scripts or workflows that require automated image processing.

CAVEATS

ImageMagick needs to be installed on your system to use the `stream` command. Large images may still require substantial memory despite the stream processing capabilities, so monitor memory usage for very large files.

PIXEL STORAGE

Understanding pixel storage order is crucial when working with raw image data. The `stream` command lets you specify the pixel interleaving and byte order. Common options include `-storage-type char`, `-storage-type short`, `-storage-type integer` to set the data type and `-endian MSB` or `-endian LSB` to set the byte order.

SEE ALSO

convert(1), mogrify(1), identify(1)

Copied to clipboard