blob: 232cf1bb0ff3f601fa8a5c38ae3310701209c7f1 [file] [log] [blame]
cristyd2432012015-05-04 23:15:15 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2<html lang="en">
cristyad41c0c2012-10-31 00:49:28 +00003<head>
cristyd2432012015-05-04 23:15:15 +00004 <meta charset="utf-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
cristyffb69ed2010-12-25 00:06:48 +00007 <title>ImageMagick: Command-line Tools: Stream</title>
cristyd2432012015-05-04 23:15:15 +00008 <meta http-equiv="content-language" content="en-US">
9 <meta http-equiv="content-type" content="text/html; charset=utf-8">
10 <meta http-equiv="reply-to" content="magick-users@imagemagick.org">
11 <meta name="application-name" content="ImageMagick">
12 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.">
13 <meta name="application-url" content="http://www.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-2012 ImageMagick Studio LLC">
23 <meta name="distribution" content="Global">
cristy44443b92015-05-05 00:06:07 +000024 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
cristyd2432012015-05-04 23:15:15 +000025 <link rel="icon" href="../images/wand.png">
26 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon">
cristy44443b92015-05-05 00:06:07 +000027 <link rel="stylesheet" href="css/bootstrap.min.css">
28 <link rel="stylesheet" href="css/magick.css">
cristyad41c0c2012-10-31 00:49:28 +000029</head>
30
cristyd2432012015-05-04 23:15:15 +000031<body>
cristyad41c0c2012-10-31 00:49:28 +000032<div class="main">
cristyd2432012015-05-04 23:15:15 +000033<div class="magick-masthead">
34 <div class="container">
35 <script type="text/javascript">
36 <!--
37 google_ad_client = "pub-3129977114552745";
38 google_ad_slot = "5439289906";
39 google_ad_width = 728;
40 google_ad_height = 90;
41 //-->
42 </script>
43 <center><script type="text/javascript" src="http://localhost/pagead/show_ads.js">
44 </script></center>
45 <nav class="magick-nav">
cristy44443b92015-05-05 00:06:07 +000046 <a class="magick-nav-item " href="../index.html">Home</a>
cristyd2432012015-05-04 23:15:15 +000047 <a class="magick-nav-item " href="binary-releases.html">Downloads</a>
48 <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
49 <a class="magick-nav-item " href="command-line-options.html">Options</a>
50 <a class="magick-nav-item " href="api.html">Development</a>
cristy44443b92015-05-05 00:06:07 +000051 <a class="magick-nav-item" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristyabed55c2015-05-06 17:07:00 +000052 <a class="magick-nav-item navbar-right " href="http://www.imagemagick.org/script/search.php">Search</a>
cristyd2432012015-05-04 23:15:15 +000053 </nav>
54 </div>
cristy3ed852e2009-09-05 21:47:34 +000055</div>
cristyd2432012015-05-04 23:15:15 +000056<div class="container">
57<div class="magick-header">
58<p class="text-center"><a href="stream.html#usage">Example Usage</a><a href="stream.html#options">Option Summary</a></p>
cristy3ed852e2009-09-05 21:47:34 +000059
cristyd2432012015-05-04 23:15:15 +000060<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>
61
62<h2 class="magick-header"><a id="usage"></a>Example Usage</h2>
cristy3ed852e2009-09-05 21:47:34 +000063
cristy8ee7f242013-06-20 16:08:44 +000064<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>
cristy3ed852e2009-09-05 21:47:34 +000065
cristyd2432012015-05-04 23:15:15 +000066<pre>
67stream -map rgb -storage-type char image.jpg pixels.dat
68display -depth 8 -size 640x480 rgb:pixels.dat
69</pre>
70
cristy3ed852e2009-09-05 21:47:34 +000071<p>Here we extract a 100x100 region from a TIFF image in the grayscale format as doubles:</p>
72
cristyd2432012015-05-04 23:15:15 +000073<pre>
74stream -map i -storage-type double -extract 100x100+30+40 image.tif gray.raw
75</pre>
76
cristy3ed852e2009-09-05 21:47:34 +000077<p>You can also associate the region to extract with the image filename:</p>
78
cristyd2432012015-05-04 23:15:15 +000079<pre>
80stream -map i -storage-type double 'image.tif[100x100+30+40]' gray.raw
81</pre>
cristy3ed852e2009-09-05 21:47:34 +000082
cristyd2432012015-05-04 23:15:15 +000083
84<h2 class="magick-header"><a id="options"></a>Option Summary</h2>
cristy3ed852e2009-09-05 21:47:34 +000085
cristy8ee7f242013-06-20 16:08:44 +000086<p>The <code>stream</code> command recognizes these options. Click on an option to get more details about how that option works.</p>
cristy3ed852e2009-09-05 21:47:34 +000087
cristyd2432012015-05-04 23:15:15 +000088<table class="table table-condensed table-striped">
cristy3ed852e2009-09-05 21:47:34 +000089 <tbody>
90 <tr>
91 <th align="left">Option</th>
92 <th align="left">Description</th>
93 </tr>
94
95 <tr>
cristyd2432012015-05-04 23:15:15 +000096 <td><a href="command-line-options.html#authenticate">-authenticate <var>value</var></a></td>
97 <td>decrypt image with this password</td>
cristy3ed852e2009-09-05 21:47:34 +000098 </tr>
99
100 <tr>
cristyd2432012015-05-04 23:15:15 +0000101 <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
102 <td>apply option to select image channels</td>
cristy3ed852e2009-09-05 21:47:34 +0000103 </tr>
104
105 <tr>
cristyd2432012015-05-04 23:15:15 +0000106 <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
107 <td>set image colorspace</td>
cristy3ed852e2009-09-05 21:47:34 +0000108 </tr>
109
110 <tr>
cristyd2432012015-05-04 23:15:15 +0000111 <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
112 <td>display copious debugging information</td>
cristy3ed852e2009-09-05 21:47:34 +0000113 </tr>
114
115 <tr>
cristyd2432012015-05-04 23:15:15 +0000116 <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
117 <td>define one or more image format options</td>
cristy3ed852e2009-09-05 21:47:34 +0000118 </tr>
119
120 <tr>
cristyd2432012015-05-04 23:15:15 +0000121 <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
122 <td>horizontal and vertical density of the image</td>
cristy3ed852e2009-09-05 21:47:34 +0000123 </tr>
124
125 <tr>
cristyd2432012015-05-04 23:15:15 +0000126 <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
127 <td>image depth</td>
cristy3ed852e2009-09-05 21:47:34 +0000128 </tr>
129
130 <tr>
cristyd2432012015-05-04 23:15:15 +0000131 <td><a href="command-line-options.html#extract">-extract <var>geometry</var></a></td>
132 <td>extract area from image</td>
cristy3ed852e2009-09-05 21:47:34 +0000133 </tr>
134
135 <tr>
cristyd2432012015-05-04 23:15:15 +0000136 <td><a href="command-line-options.html#help">-help</a></td>
137 <td>print program options</td>
cristy3ed852e2009-09-05 21:47:34 +0000138 </tr>
139
140 <tr>
cristyd2432012015-05-04 23:15:15 +0000141 <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
142 <td>type of image interlacing scheme</td>
cristy3ed852e2009-09-05 21:47:34 +0000143 </tr>
144
145 <tr>
cristyd2432012015-05-04 23:15:15 +0000146 <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
147 <td>pixel color interpolation method</td>
cristy3ed852e2009-09-05 21:47:34 +0000148 </tr>
149
150 <tr>
cristyd2432012015-05-04 23:15:15 +0000151 <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
152 <td>pixel cache resource limit</td>
cristy3ed852e2009-09-05 21:47:34 +0000153 </tr>
154
155 <tr>
cristyd2432012015-05-04 23:15:15 +0000156 <td><a href="command-line-options.html#list">-list <var>type</var></a></td>
157 <td>Color, Configure, Delegate, Format, Magic, Module, Resource, or Type</td>
cristy3ed852e2009-09-05 21:47:34 +0000158 </tr>
159
160 <tr>
cristyd2432012015-05-04 23:15:15 +0000161 <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
162 <td>format of debugging information</td>
cristy3ed852e2009-09-05 21:47:34 +0000163 </tr>
164
165 <tr>
cristyd2432012015-05-04 23:15:15 +0000166 <td><a href="command-line-options.html#stream-map">-map <var>components</var></a></td>
167 <td>store pixels in this format.</td>
cristy3ed852e2009-09-05 21:47:34 +0000168 </tr>
169
170 <tr>
cristyd2432012015-05-04 23:15:15 +0000171 <td><a href="command-line-options.html#monitor">-monitor</a></td>
172 <td>monitor progress</td>
cristy3ed852e2009-09-05 21:47:34 +0000173 </tr>
174
175 <tr>
cristyd2432012015-05-04 23:15:15 +0000176 <td><a href="command-line-options.html#quantize">-quantize <var>colorspace</var></a></td>
177 <td>reduce image colors in this colorspace</td>
cristy3ed852e2009-09-05 21:47:34 +0000178 </tr>
179
180 <tr>
cristyd2432012015-05-04 23:15:15 +0000181 <td><a href="command-line-options.html#quiet">-quiet</a></td>
182 <td>suppress all warning messages</td>
cristy3ed852e2009-09-05 21:47:34 +0000183 </tr>
184
185 <tr>
cristyd2432012015-05-04 23:15:15 +0000186 <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
187 <td>pay attention to warning messages.</td>
cristy3ed852e2009-09-05 21:47:34 +0000188 </tr>
189
190 <tr>
cristyd2432012015-05-04 23:15:15 +0000191 <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
192 <td>settings remain in effect until parenthesis boundary.</td>
cristy3ed852e2009-09-05 21:47:34 +0000193 </tr>
194
195 <tr>
cristyd2432012015-05-04 23:15:15 +0000196 <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
197 <td>horizontal and vertical sampling factor</td>
cristy3ed852e2009-09-05 21:47:34 +0000198 </tr>
199
200 <tr>
cristyd2432012015-05-04 23:15:15 +0000201 <td><a href="command-line-options.html#seed">-seed <var>value</var></a></td>
202 <td>seed a new sequence of pseudo-random numbers</td>
cristy3ed852e2009-09-05 21:47:34 +0000203 </tr>
204
205 <tr>
cristyd2432012015-05-04 23:15:15 +0000206 <td><a href="command-line-options.html#set">-set <var>attribute value</var></a></td>
207 <td>set an image attribute</td>
cristy3ed852e2009-09-05 21:47:34 +0000208 </tr>
209
210 <tr>
cristyd2432012015-05-04 23:15:15 +0000211 <td><a href="command-line-options.html#size">-size <var>geometry</var></a></td>
212 <td>width and height of image</td>
cristy3ed852e2009-09-05 21:47:34 +0000213 </tr>
214
215 <tr>
cristyd2432012015-05-04 23:15:15 +0000216 <td><a href="command-line-options.html#storage-type">-storage-type <var>type</var></a></td>
217 <td>store pixels with this storage type.</td>
cristy3ed852e2009-09-05 21:47:34 +0000218 </tr>
219
220 <tr>
cristyd2432012015-05-04 23:15:15 +0000221 <td><a href="command-line-options.html#synchronize">-synchronize</a></td>
222 <td>synchronize image to storage device</td>
cristy5063d812010-10-19 16:28:10 +0000223 </tr>
224
225 <tr>
cristyd2432012015-05-04 23:15:15 +0000226 <td><a href="command-line-options.html#taint">-taint</a></td>
227 <td>mark the image as modified</td>
cristy5063d812010-10-19 16:28:10 +0000228 </tr>
229
230 <tr>
cristyd2432012015-05-04 23:15:15 +0000231 <td><a href="command-line-options.html#transparent-color">-transparent-color <var>color</var></a></td>
232 <td>transparent color</td>
cristy3ed852e2009-09-05 21:47:34 +0000233 </tr>
234
235 <tr>
cristyd2432012015-05-04 23:15:15 +0000236 <td><a href="command-line-options.html#verbose">-verbose</a></td>
237 <td>print detailed information about the image</td>
cristy3ed852e2009-09-05 21:47:34 +0000238 </tr>
239
240 <tr>
cristyd2432012015-05-04 23:15:15 +0000241 <td><a href="command-line-options.html#version">-version</a></td>
242 <td>print version information</td>
cristy3ed852e2009-09-05 21:47:34 +0000243 </tr>
244
245 <tr>
cristyd2432012015-05-04 23:15:15 +0000246 <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
247 <td>access method for pixels outside the boundaries of the image</td>
cristy3ed852e2009-09-05 21:47:34 +0000248 </tr>
249
250 </tbody>
251</table>
252
253</div>
cristyd2432012015-05-04 23:15:15 +0000254 <footer class="magick-footer">
255 <div class="magick-nav-item navbar-left">
cristy85893d32015-05-06 13:44:09 +0000256 <a href="support.html">Donate</a>
cristyd2432012015-05-04 23:15:15 +0000257 </div>
258 <div class="magick-nav-item navbar-right">
cristy44443b92015-05-05 00:06:07 +0000259 <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../index.html"></a>
cristyd2432012015-05-04 23:15:15 +0000260 <noscript>
261 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
262 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
263 </noscript>
264 </div>
265 <p><a href="sitemap.html">Sitemap</a>
266 <a href="links.html">Related</a>
267 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Image Studio</a>
268 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
269 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
270</p>
271 <p><a href="stream.html#">Back to top</a>
cristy85893d32015-05-06 13:44:09 +0000272 <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
cristyd2432012015-05-04 23:15:15 +0000273 </footer>
274</div><!-- /.container -->
cristyad41c0c2012-10-31 00:49:28 +0000275
cristyd2432012015-05-04 23:15:15 +0000276 <script src="https://localhost/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
277 <script src="../js/bootstrap.min.js"></script>
278 <script type="text/javascript">
279 /* */
280 (function() {
281 var s = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
282 s.type = 'text/javascript';
283 s.async = true;
284 s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
285 t.parentNode.insertBefore(s, t);
286 })();
287 /* */
288 </script>
cristyad41c0c2012-10-31 00:49:28 +0000289</div>
cristyad41c0c2012-10-31 00:49:28 +0000290</body>
cristy5a367e42015-05-05 12:39:18 +0000291</html>