| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pamtooctaveimg User Manual" 1 "27 June 2007" "netpbm documentation" |
| 7 |
.PP |
| 8 |
.SH NAME |
| 9 |
.PP |
| 10 |
pamtooctaveimg - convert a Netpbm image to a GNU Octave image |
| 11 |
|
| 12 |
.UN synopsis |
| 13 |
.SH SYNOPSIS |
| 14 |
.PP |
| 15 |
\fBpamtooctaveimg\fP |
| 16 |
[\fInetpbmfile\fP] |
| 17 |
|
| 18 |
.UN description |
| 19 |
.SH DESCRIPTION |
| 20 |
.PP |
| 21 |
This program is part of |
| 22 |
.BR "Netpbm" (1)\c |
| 23 |
\&. |
| 24 |
.PP |
| 25 |
\fBpamtooctaveimg\fP reads a Netpbm image as input and produces a |
| 26 |
.UR http://www.octave.org/ |
| 27 |
GNU Octave |
| 28 |
.UE |
| 29 |
\& image file as output. |
| 30 |
.PP |
| 31 |
An Octave image file (called "Octave's image format" in |
| 32 |
Octave documentation) is a particular kind of Octave data file. It |
| 33 |
describes two matrices: |
| 34 |
|
| 35 |
|
| 36 |
.IP \(bu |
| 37 |
the image itself as a list of indexes into a colormap, and |
| 38 |
.IP \(bu |
| 39 |
the corresponding colormap as a list of {red, green, blue} triplets. |
| 40 |
|
| 41 |
.PP |
| 42 |
An Octave data file is an ASCII text file that you use to import data |
| 43 |
to Octave. |
| 44 |
.PP |
| 45 |
See the |
| 46 |
.UR http://www.gnu.org/software/octave/doc/interpreter/Image-Processing.html#Image-Processing |
| 47 |
Image Processing chapter |
| 48 |
.UE |
| 49 |
\& of the GNU Octave manual for details. |
| 50 |
.PP |
| 51 |
\fBpamtooctaveimg\fP writes the output Octave image to Standard Output. |
| 52 |
|
| 53 |
.UN options |
| 54 |
.SH OPTIONS |
| 55 |
.PP |
| 56 |
There are no command line options defined specifically |
| 57 |
for \fBpamtooctaveimg\fP, but it recognizes the options common to all |
| 58 |
programs based on libnetpbm (See |
| 59 |
.UR index.html#commonoptions |
| 60 |
Common Options |
| 61 |
.UE |
| 62 |
\&.) |
| 63 |
|
| 64 |
.UN arguments |
| 65 |
.SH ARGUMENTS |
| 66 |
.PP |
| 67 |
\fInetpbmfile\fP is the name of the file containing the input PNM |
| 68 |
or PAM image, or \fB-\fP to indicate Standard Input. If you don't |
| 69 |
specify \fInetpbmfile\fP, the input is from Standard Input. |
| 70 |
\fBpamtooctaveimg\fP converts only the first image in the input stream. |
| 71 |
|
| 72 |
.UN examples |
| 73 |
.SH EXAMPLES |
| 74 |
|
| 75 |
.nf |
| 76 |
\f(CW |
| 77 |
% pamtooctaveimg myimage.ppm > myimage.img |
| 78 |
% octave |
| 79 |
> [img,map] = loadimage("myimage.img"); |
| 80 |
|
| 81 |
# (At this point, img is an X by Y matrix and map is a 3 by M matrix.) |
| 82 |
|
| 83 |
> imshow(img,map); # Displays img with colormap map |
| 84 |
> [r,g,b] = ind2rgb(img,map); |
| 85 |
|
| 86 |
# (r, g, and b are now each X by Y matrices of color levels [0 to 1].) |
| 87 |
|
| 88 |
> [newimg,newmap] = rgb2ind(r,b,g); # Swap the blue and green channels. |
| 89 |
> saveimage("newimage.ppm", newimg, "ppm", newmap); # Save as a PPM file. |
| 90 |
\fP |
| 91 |
|
| 92 |
.fi |
| 93 |
|
| 94 |
.UN notes |
| 95 |
.SH NOTES |
| 96 |
.PP |
| 97 |
There is no \fBoctavetopam\fP program. However, GNU Octave's |
| 98 |
\fBsaveimage\fP command can save images in PPM format. |
| 99 |
|
| 100 |
.UN history |
| 101 |
.SH HISTORY |
| 102 |
.PP |
| 103 |
\fBpamtooctaveimg\fP was new in Netpbm 10.39 (June 2007). |
| 104 |
|
| 105 |
.UN author |
| 106 |
.SH AUTHOR |
| 107 |
.PP |
| 108 |
Copyright (C) 2007 Scott Pakin, |
| 109 |
\[email protected]\fP. |
| 110 |
|
| 111 |
.UN seealso |
| 112 |
.SH SEE ALSO |
| 113 |
.BR "\fBoctave\fP" (1)\c |
| 114 |
\&, |
| 115 |
.BR "\fBpam\fP" (1)\c |
| 116 |
\&. |
| 117 |
.SH DOCUMENT SOURCE |
| 118 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 119 |
source. The master documentation is at |
| 120 |
.IP |
| 121 |
.B http://netpbm.sourceforge.net/doc/pamtooctaveimg.html |
| 122 |
.PP |