Back to Imagemagick

ImageMagick

www/stream.html

7.1.2-214.3 KB
Original Source

Example UsageOption Summary

Stream is a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats. It writes the pixel components as they are read from the input image a row at a time making stream desirable when working with large images or when you require raw pixel components.

Example Usage

We list a few examples of the stream command here to illustrate its usefulness and ease of use. To get started, lets stream the red, green, blue components of a 640x480 JPEG image to disk as unsigned characters:

magick stream -map rgb -storage-type char image.jpg pixels.dat magick display -depth 8 -size 640x480 rgb:pixels.dat

Here we extract a 100x100 region from a TIFF image in the grayscale format as doubles:

magick stream -map i -storage-type double -extract 100x100+30+40 image.tif gray.raw

You can also associate the region to extract with the image filename:

magick stream -map i -storage-type double 'image.tif[100x100+30+40]' gray.raw

Streaming requires that the image coder read the image pixels in row order. Not all formats adhere to this requirement. Verify a particular image format first, before you utilize streaming in your workflow.

Option Summary

The stream command recognizes these options. Click on an option to get more details about how that option works.

OptionDescription
-authenticate valuedecrypt image with this password
-channel typeapply option to select image channels
-colorspace typeset image colorspace
-debug eventsdisplay copious debugging information
-define format:optiondefine one or more image format options
-density geometryhorizontal and vertical density of the image
-depth valueimage depth
-extract geometryextract area from image
-helpprint program options
-interlace typetype of image interlacing scheme
-interpolate methodpixel color interpolation method
-limit type valuepixel cache resource limit
-list typeColor, Configure, Delegate, Format, Magic, Module, Resource, or Type
-log formatformat of debugging information
-map componentsstore pixels in this format.
-monitormonitor progress
-quantize colorspacereduce image colors in this colorspace
-quietsuppress all warning messages
-regard-warningspay attention to warning messages.
-respect-parenthesessettings remain in effect until parenthesis boundary.
-sampling-factor geometryhorizontal and vertical sampling factor
-seed valueseed a new sequence of pseudo-random numbers
-set attribute valueset an image attribute
-size geometrywidth and height of image
-storage-type typestore pixels with this storage type.
-synchronizesynchronize image to storage device
-taintmark the image as modified
-transparent-color colortransparent color
-verboseprint detailed information about the image
-versionprint version information
-virtual-pixel methodaccess method for pixels outside the boundaries of the image

About ImageMagick