1Pamtooctaveimg User Manual(0)                    Pamtooctaveimg User Manual(0)
2
3
4

NAME

6       pamtooctaveimg - convert a Netpbm image to a GNU Octave image
7
8

SYNOPSIS

10       pamtooctaveimg [netpbmfile]
11
12

DESCRIPTION

14       This program is part of Netpbm(1).
15
16       pamtooctaveimg  reads a Netpbm image as input and produces a GNU Octave
17http://www.octave.org/⟩  image file as output.
18
19       An Octave image file (called "Octave's image format" in Octave documen‐
20       tation) is a particular kind of Octave data file.  It describes two ma‐
21       trices:
22
23
24
25       •      the image itself as a list of indexes into a colormap, and
26
27       •      the corresponding colormap as a list of {red, green, blue} trip‐
28              lets.
29
30
31       An  Octave  data file is an ASCII text file that you use to import data
32       to Octave.
33
34       See the
35        Image                        Processing                        chapter
36http://www.gnu.org/software/octave/doc/interpreter/Image-
37       Processing.html#Image-Processing⟩  of the GNU  Octave  manual  for  de‐
38       tails.
39
40       pamtooctaveimg writes the output Octave image to Standard Output.
41
42

OPTIONS

44       There  are  no  command  line options defined specifically for pamtooc‐
45       taveimg, but it recognizes the options common to all programs based  on
46       libnetpbm (See
47        Common Options ⟨index.html#commonoptions⟩ .)
48
49

ARGUMENTS

51       netpbmfile  is the name of the file containing the input PNM or PAM im‐
52       age, or - to indicate Standard Input.  If you don't specify netpbmfile,
53       the  input  is  from  Standard Input.  pamtooctaveimg converts only the
54       first image in the input stream.
55
56

EXAMPLES

58          % pamtooctaveimg myimage.ppm > myimage.img
59          % octave
60          > [img,map] = loadimage("myimage.img");
61
62          # (At this point, img is an X by Y matrix and map is a 3 by M matrix.)
63
64          > imshow(img,map);   # Displays img with colormap map
65          > [r,g,b] = ind2rgb(img,map);
66
67          # (r, g, and b are now each X by Y matrices of color levels [0 to 1].)
68
69          > [newimg,newmap] = rgb2ind(r,b,g);   # Swap the blue and green channels.
70          > saveimage("newimage.ppm", newimg, "ppm", newmap);  # Save as a PPM file.
71
72
73

NOTES

75       There is no octavetopam program.  However, GNU Octave's saveimage  com‐
76       mand can save images in PPM format.
77
78

HISTORY

80       pamtooctaveimg was new in Netpbm 10.39 (June 2007).
81
82

AUTHOR

84       Copyright (C) 2007 Scott Pakin, scott+pbm@pakin.org.
85
86

SEE ALSO

88       octave(1), pam(1).
89

DOCUMENT SOURCE

91       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
92       source.  The master documentation is at
93
94              http://netpbm.sourceforge.net/doc/pamtooctaveimg.html
95
96netpbm documentation             27 June 2007    Pamtooctaveimg User Manual(0)
Impressum