1 2 3 4 5<!DOCTYPE html> 6<html lang="en"> 7<head> 8 <meta charset="utf-8" /> 9 <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no" /> 10 <title>Command-line Tools: Stream @ ImageMagick</title> 11 <meta name="application-name" content="ImageMagick" /> 12 <meta name="description" content="Use ImageMagick® to create, edit, compose, or convert bitmap images. You can resize your image, crop it, change its shades and colors, add captions, among other operations." /> 13 <meta name="application-url" content="https://imagemagick.org" /> 14 <meta name="generator" content="PHP" /> 15 <meta name="keywords" content="command-line, tools:, stream, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" /> 16 <meta name="rating" content="GENERAL" /> 17 <meta name="robots" content="INDEX, FOLLOW" /> 18 <meta name="generator" content="ImageMagick Studio LLC" /> 19 <meta name="author" content="ImageMagick Studio LLC" /> 20 <meta name="revisit-after" content="2 DAYS" /> 21 <meta name="resource-type" content="document" /> 22 <meta name="copyright" content="Copyright (c) 1999-2019 ImageMagick Studio LLC" /> 23 <meta name="distribution" content="Global" /> 24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" /> 25 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> 26 <link href="stream.html" rel="canonical" /> 27 <link href="../images/wand.png" rel="icon" /> 28 <link href="../images/wand.ico" rel="shortcut icon" /> 29 <link href="assets/magick.css" rel="stylesheet" /> 30</head> 31<body> 32 <header> 33 <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> 34 <a class="navbar-brand" href="../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a> 35 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation"> 36 <span class="navbar-toggler-icon"></span> 37 </button> 38 39 <div class="navbar-collapse collapse" id="navbarsMagick" style=""> 40 <ul class="navbar-nav mr-auto"> 41 <li class="nav-item "> 42 <a class="nav-link" href="api/quantize.html">Home <span class="sr-only">(current)</span></a> 43 </li> 44 <li class="nav-item "> 45 <a class="nav-link" href="../www/download.html">Download</a> 46 </li> 47 <li class="nav-item "> 48 <a class="nav-link" href="../www/command-line-tools.html">Tools</a> 49 </li> 50 <li class="nav-item "> 51 <a class="nav-link" href="../www/command-line-processing.html">Command-line</a> 52 </li> 53 <li class="nav-item "> 54 <a class="nav-link" href="../www/resources.html">Resources</a> 55 </li> 56 <li class="nav-item "> 57 <a class="nav-link" href="../www/develop.html">Develop</a> 58 </li> 59 <li class="nav-item"> 60 <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a> 61 </li> 62 </ul> 63 <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php"> 64 <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search"> 65 <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button> 66 </form> 67 </div> 68 </nav> 69 <div class="container"> 70 <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" 71 style="display:block" 72 data-ad-client="ca-pub-3129977114552745" 73 data-ad-slot="6345125851" 74 data-ad-format="auto"></ins> 75 <script> 76 (adsbygoogle = window.adsbygoogle || []).push({}); 77 </script> 78 79 </div> 80 </header> 81 <main class="container"> 82 <div class="magick-template"> 83<div class="magick-header"> 84<p class="text-center"><a href="stream.html#usage">Example Usage</a> • <a href="stream.html#options">Option Summary</a></p> 85 86<p class="lead magick-description"><code>Stream</code> 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 <code>stream</code> desirable when working with large images or when you require raw pixel components.</p> 87 88<h2><a class="anchor" id="usage"></a>Example Usage</h2> 89 90<p>We list a few examples of the <code>stream</code> 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:</p> 91 92<pre class="highlight"><code>magick stream -map rgb -storage-type char image.jpg pixels.dat 93magick display -depth 8 -size 640x480 rgb:pixels.dat 94</code></pre> 95 96<p>Here we extract a 100x100 region from a TIFF image in the grayscale format as doubles:</p> 97 98<pre class="highlight"><code>magick stream -map i -storage-type double -extract 100x100+30+40 image.tif gray.raw 99</code></pre> 100 101<p>You can also associate the region to extract with the image filename:</p> 102 103<pre class="highlight"><code>magick stream -map i -storage-type double 'image.tif[100x100+30+40]' gray.raw 104</code></pre> 105 106 107<h2><a class="anchor" id="options"></a>Option Summary</h2> 108 109<p>The <code>stream</code> command recognizes these options. Click on an option to get more details about how that option works.</p> 110 111<table class="table table-sm table-striped"> 112 <tbody> 113 <tr> 114 <th align="left">Option</th> 115 <th align="left">Description</th> 116 </tr> 117 118 <tr> 119 <td><a href="../www/command-line-options.html#authenticate">-authenticate <var>value</var></a></td> 120 <td>decrypt image with this password</td> 121 </tr> 122 123 <tr> 124 <td><a href="../www/command-line-options.html#channel">-channel <var>type</var></a></td> 125 <td>apply option to select image channels</td> 126 </tr> 127 128 <tr> 129 <td><a href="../www/command-line-options.html#colorspace">-colorspace <var>type</var></a></td> 130 <td>set image colorspace</td> 131 </tr> 132 133 <tr> 134 <td><a href="../www/command-line-options.html#debug">-debug <var>events</var></a></td> 135 <td>display copious debugging information</td> 136 </tr> 137 138 <tr> 139 <td><a href="../www/command-line-options.html#define">-define <var>format:option</var></a></td> 140 <td>define one or more image format options</td> 141 </tr> 142 143 <tr> 144 <td><a href="../www/command-line-options.html#density">-density <var>geometry</var></a></td> 145 <td>horizontal and vertical density of the image</td> 146 </tr> 147 148 <tr> 149 <td><a href="../www/command-line-options.html#depth">-depth <var>value</var></a></td> 150 <td>image depth</td> 151 </tr> 152 153 <tr> 154 <td><a href="../www/command-line-options.html#extract">-extract <var>geometry</var></a></td> 155 <td>extract area from image</td> 156 </tr> 157 158 <tr> 159 <td><a href="../www/command-line-options.html#help">-help</a></td> 160 <td>print program options</td> 161 </tr> 162 163 <tr> 164 <td><a href="../www/command-line-options.html#interlace">-interlace <var>type</var></a></td> 165 <td>type of image interlacing scheme</td> 166 </tr> 167 168 <tr> 169 <td><a href="../www/command-line-options.html#interpolate">-interpolate <var>method</var></a></td> 170 <td>pixel color interpolation method</td> 171 </tr> 172 173 <tr> 174 <td><a href="../www/command-line-options.html#limit">-limit <var>type value</var></a></td> 175 <td>pixel cache resource limit</td> 176 </tr> 177 178 <tr> 179 <td><a href="../www/command-line-options.html#list">-list <var>type</var></a></td> 180 <td>Color, Configure, Delegate, Format, Magic, Module, Resource, or Type</td> 181 </tr> 182 183 <tr> 184 <td><a href="../www/command-line-options.html#log">-log <var>format</var></a></td> 185 <td>format of debugging information</td> 186 </tr> 187 188 <tr> 189 <td><a href="../www/command-line-options.html#stream-map">-map <var>components</var></a></td> 190 <td>store pixels in this format.</td> 191 </tr> 192 193 <tr> 194 <td><a href="../www/command-line-options.html#monitor">-monitor</a></td> 195 <td>monitor progress</td> 196 </tr> 197 198 <tr> 199 <td><a href="../www/command-line-options.html#quantize">-quantize <var>colorspace</var></a></td> 200 <td>reduce image colors in this colorspace</td> 201 </tr> 202 203 <tr> 204 <td><a href="../www/command-line-options.html#quiet">-quiet</a></td> 205 <td>suppress all warning messages</td> 206 </tr> 207 208 <tr> 209 <td><a href="../www/command-line-options.html#regard-warnings">-regard-warnings</a></td> 210 <td>pay attention to warning messages.</td> 211 </tr> 212 213 <tr> 214 <td><a href="../www/command-line-options.html#respect-parentheses">-respect-parentheses</a></td> 215 <td>settings remain in effect until parenthesis boundary.</td> 216 </tr> 217 218 <tr> 219 <td><a href="../www/command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td> 220 <td>horizontal and vertical sampling factor</td> 221 </tr> 222 223 <tr> 224 <td><a href="../www/command-line-options.html#seed">-seed <var>value</var></a></td> 225 <td>seed a new sequence of pseudo-random numbers</td> 226 </tr> 227 228 <tr> 229 <td><a href="../www/command-line-options.html#set">-set <var>attribute value</var></a></td> 230 <td>set an image attribute</td> 231 </tr> 232 233 <tr> 234 <td><a href="../www/command-line-options.html#size">-size <var>geometry</var></a></td> 235 <td>width and height of image</td> 236 </tr> 237 238 <tr> 239 <td><a href="../www/command-line-options.html#storage-type">-storage-type <var>type</var></a></td> 240 <td>store pixels with this storage type.</td> 241 </tr> 242 243 <tr> 244 <td><a href="../www/command-line-options.html#synchronize">-synchronize</a></td> 245 <td>synchronize image to storage device</td> 246 </tr> 247 248 <tr> 249 <td><a href="../www/command-line-options.html#taint">-taint</a></td> 250 <td>mark the image as modified</td> 251 </tr> 252 253 <tr> 254 <td><a href="../www/command-line-options.html#transparent-color">-transparent-color <var>color</var></a></td> 255 <td>transparent color</td> 256 </tr> 257 258 <tr> 259 <td><a href="../www/command-line-options.html#verbose">-verbose</a></td> 260 <td>print detailed information about the image</td> 261 </tr> 262 263 <tr> 264 <td><a href="../www/command-line-options.html#version">-version</a></td> 265 <td>print version information</td> 266 </tr> 267 268 <tr> 269 <td><a href="../www/command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td> 270 <td>access method for pixels outside the boundaries of the image</td> 271 </tr> 272 273 </tbody> 274</table> 275 276</div> 277 </div> 278 </main><!-- /.container --> 279 <footer class="magick-footer"> 280 <p><a href="../www/security-policy.html">Security</a> • 281 <a href="../www/architecture.html">Architecture</a> • 282 <a href="../www/links.html">Related</a> • 283 <a href="../www/sitemap.html">Sitemap</a> 284 285 <a href="stream.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico"/></a> 286 287 <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • 288 <a href="../www/support.html">Donate</a> • 289 <a href="../www/https://imagemagick.org/script/contact.php">Contact Us</a> 290 <br/> 291 <small>© 1999-2019 ImageMagick Studio LLC</small></p> 292 </footer> 293 294 <!-- Javascript assets --> 295 <script src="assets/magick.js" crossorigin="anonymous"></script> 296 <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script> 297</body> 298</html> 299