summary refs log tree commit diff
path: root/pamtooctaveimg.html
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-06-28 02:02:18 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-06-28 02:02:18 +0000
commit5111fa2e7f490d7d34ae95b5a412e5a8a313a938 (patch)
tree136c72c3c50acc6589d734887a86b8f27827b333 /pamtooctaveimg.html
parent7f21e52f8ee6780de7332c3a96560847f9885b8b (diff)
downloadnetpbm-mirror-5111fa2e7f490d7d34ae95b5a412e5a8a313a938.tar.gz
netpbm-mirror-5111fa2e7f490d7d34ae95b5a412e5a8a313a938.tar.xz
netpbm-mirror-5111fa2e7f490d7d34ae95b5a412e5a8a313a938.zip
"miscellaneous update"
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@336 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'pamtooctaveimg.html')
-rw-r--r--pamtooctaveimg.html107
1 files changed, 107 insertions, 0 deletions
diff --git a/pamtooctaveimg.html b/pamtooctaveimg.html
new file mode 100644
index 00000000..095f79a8
--- /dev/null
+++ b/pamtooctaveimg.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<title>Pamtooctaveimg User Manual</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+
+<body>
+
+<h1>pamtooctaveimg</h1>
+
+<p>Updated: 27 June 2007<br />
+<a href="#index">Table Of Contents</a></p>
+
+<h2>NAME</h2>
+
+<p>pamtooctaveimg - convert a Netpbm image to a GNU Octave image</p>
+
+<h2 id="synopsis">SYNOPSIS</h2>
+
+<p><b>pamtooctaveimg</b>
+[<i>netpbmfile</i>]
+
+<h2 id="description">DESCRIPTION</h2>
+
+<p>This program is part of <a href="index.html">Netpbm</a>.</p>
+
+<p><b>pamtooctaveimg</b> reads a Netpbm image as input and produces a <a
+href="http://www.octave.org/">GNU Octave</a> image file as output.
+
+<p>An Octave image file (called &quot;Octave's image format&quot; in
+Octave documentation) is a particular kind of Octave data file.  It
+describes two matrices:
+
+<ol>
+<li>the image itself as a list of indexes into a colormap, and</li>
+<li>the corresponding colormap as a list of {red, green, blue} triplets.</li>
+</ol>
+
+<p>An Octave data file is an ASCII text file that you use to import data
+to Octave.
+
+<p>See the <a
+href="http://www.gnu.org/software/octave/doc/interpreter/Image-Processing.html#Image-Processing">
+Image Processing chapter</a> of the GNU Octave manual for details.
+
+<h2 id="arguments">Arguments</h2>
+
+<p><i>netpbmfile</i> is the name of the file containing the input PNM
+or PAM image, or <b>-</b> to indicate Standard Input.  If you don't
+specify <i>netpbmfile</i>, the input is from Standard Input.
+<b>pamtooctaveimg</b> converts only the first image in the input stream.
+<b>pamtooctaveimg</b> writes the output Octave image to Standard Output.
+
+
+<h2 id="examples">Examples</h2>
+
+<p>
+<kbd>
+   % pamtooctaveimg myimage.ppm > myimage.img
+   % octave
+   > [img,map] = loadimage("myimage.img");
+
+   # (At this point, img is an X by Y matrix and map is a 3 by M matrix.)
+
+   > imshow(img,map);   # Displays img with colormap map
+   > [r,g,b] = ind2rgb(img,map);
+
+   # (r, g, and b are now each X by Y matrices of color levels [0 to 1].)
+
+   > [newimg,newmap] = rgb2ind(r,b,g);   # Swap the blue and green channels.
+   > saveimage("newimage.ppm", newimg, "ppm", newmap);  # Save as a PPM file.
+</kbd>
+
+
+<h2 id="notes">NOTES</h2>
+
+<p>There is no <b>octavetopam</b> program.  However, GNU Octave's
+<b>saveimage</b> command can save images in PPM format.</p>
+
+
+<h2 id="history">HISTORY</h2>
+
+<p><b>pamtooctaveimg</b> was new in Netpbm 10.39 (June 2007).
+
+
+<h2 id="seealso">SEE ALSO</h2>
+
+<a
+href="http://www.gnu.org/software/octave/doc/interpreter/index.html"><b>octave</b></a>,
+<a href="pam.html"><b>pam</b></a>.</p>
+
+<hr />
+
+<h2 id="index">Table Of Contents</h2>
+<ul>
+<li><a href="#synopsis">SYNOPSIS</a></li>
+<li><a href="#description">DESCRIPTION</a></li>
+<li><a href="#arguments">ARGUMENTS</a></li>
+<li><a href="#examples">EXAMPLES</a></li>
+<li><a href="#notes">NOTES</a></li>
+<li><a href="#history">HISTORY</a></li>
+<li><a href="#seealso">SEE ALSO</a></li>
+</ul>
+</body>
+</html>
+