LinuxCommandLibrary

stream.im6

Convert, manipulate, and stream image formats

SYNOPSIS

stream [options] input_file output_file

PARAMETERS

-map <map>
    Specifies the pixel components to extract. Common maps include 'RGB' for red, green, blue channels, 'RGBA' for red, green, blue, alpha, or 'CMYK' for cyan, magenta, yellow, black. For example, 'R' extracts only the red channel.

-depth <value>
    Sets the bit depth of the pixel components in the output file. Typical values are 8, 16, or 32, representing the number of bits per pixel component.

-storage-type <type>
    Defines the data type for the pixel values in the output. Supported types include 'char', 'short', 'long', 'float', or 'double', influencing how pixel data is stored in memory and written to the file.

-extract <geometry>
    Extracts a specific rectangular region of the image. The geometry is specified as 'WxH+X+Y', where W and H are width and height, and X and Y are the offset coordinates from the top-left corner.

-size <geometry>
    Used when the input_file is raw image data (e.g., 'RGB:raw_data.bin') to specify its dimensions (WxH). This option is crucial for ImageMagick to correctly interpret the raw input stream.

-verbose
    Prints detailed information about the image processing, including input/output details and any warnings or errors.

DESCRIPTION

The stream.im6 command, part of the ImageMagick 6 suite, is a powerful utility designed for extracting raw pixel data from images. Unlike convert or other ImageMagick tools that produce standard image formats, stream outputs unformatted pixel components directly to a file. This low-level capability is particularly useful for tasks requiring direct manipulation or analysis of image data, such as custom image processing pipelines, scientific applications, or when dealing with very large images where traditional image formats might be inefficient.

Users can specify which pixel components (e.g., Red, Green, Blue, Alpha) to extract, their bit depth, and storage type, providing fine-grained control over the output data. It's a foundational tool for advanced users and developers working with image internals rather than high-level image viewing or editing, enabling efficient access to raw image buffers.

CAVEATS

The output of stream.im6 is raw pixel data, not a formatted image file. This means the output file cannot be directly opened by standard image viewers without external interpretation or conversion. Users must understand the specified pixel map, depth, and storage type to correctly interpret the byte stream. Processing very large images with stream can generate extremely large output files, potentially consuming significant disk space. Its primary use case is for programmatic access to pixel data, not general user interaction.

HISTORY

The stream command is an integral part of the ImageMagick software suite, a comprehensive collection of tools for creating, editing, and converting bitmap images. ImageMagick was first developed by John Cristy in 1987. The stream utility, specifically designed for low-level raw pixel data access, has been a core component of ImageMagick for many years, including in its widely used version 6 (hence 'im6'). It provides fundamental capabilities for developers and advanced users who need direct access to image internals for custom processing or analysis pipelines, predating and coexisting with newer ImageMagick versions.

SEE ALSO

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

Copied to clipboard