Example Usage • Option 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.