Home
Manual
Packages
Global Index
Keywords
Quick Reference
|
functions in pnm.i - p
pnm
|
#include "pnm.i"
makes pnm_read and pnm_write functions available, which see.
keyword, defined at i/pnm.i line 28
|
pnm_colorize
|
color_image= pnm_colorize(image)
colorize the width-by-height array IMAGE, returning a 3-by-
width-by-height array, suitable for use with pnm_write.
The current graphics palette is used to perform the colorization.
The keywords cmin=, cmax=, and top= are recognized and have the
same meaning as for the plf, pli, and bytscl functions.
interpreted function, defined at i/pnm.i line 388
|
SEE ALSO:
|
pnm_write,
bytscl
|
pnm_display
|
pnm_display, image
Attempt to display the IMAGE with the pli command and a pseudo-color
palette. The IMAGE must be a 3-by-width-by-height array of RGB
pixel values. If called as a function, the return value is the
width-by-height array of pixels which index into the new palette.
The palette is returned as the external variables red, green, and
blue. The new palette is both coarse and slow to compute.
The size= keyword can be used to set the palette size. The default
is 200 colors, the size of all the distribution palettes.
The flip=1 keyword can be used to flip the image bottom for top.
The square=1 limits flag is set; use
limits,square=0
to return to the default non-square plot limits.
interpreted function, defined at i/pnm.i line 219
|
SEE ALSO:
|
pnm_read
|
pnm_read
|
image= pnm_read(filename)
or image= pnm_read(filename, noflip)
read a PBM, PGM, or PPM image from FILENAME. PBM and PGM files
result in width-by-height arrays; PPM files result in 3-by-width-
by-height arrays. If NOFLIP is present and non-zero, the returned
image is in exactly the order stored in FILENAME. Otherwise, the
height dimension is reversed, since images in the files read top
to bottom, while the Yorick image plotting commands go bottom to
top.
interpreted function, defined at i/pnm.i line 35
|
SEE ALSO:
|
pnm_display,
pnm_write
|
pnm_write
|
pnm_write, image, filename)
or pnm_write, image, filename, noflip)
write IMAGE to a PBM, PGM, or PPM file called FILENAME. If
NOFLIP is present and non-zero, the image in FILENAME is stored
in exactly the order of IMAGE in memory. Otherwise, the height
dimension is reversed, since images in the files read top to
bottom, while the Yorick image plotting commands go bottom to
top.
If IMAGE is a 3-by-width-by-height array, a PPM will be written.
Otherwise, IMAGE must be a width-by-height array. If IMAGE
contains at most two distinct values, a PBM will be written,
otherwise a PGM. If IMAGE is of type char, it will be used as
is, otherwise it will be scaled to the range 0 to 255.
If the text= keyword is present and non-zero, a text PNM file
will be written; the default is to write a binary or raw PNM.
If the noscale= keyword is supplied, the IMAGE will not be
scaled to the range 0 to 255. In this case, the IMAGE must
have an integer data type with minimum value >=0. Note that
if max(image)>255, a text PGM or PPM file will be written
(overriding the text= keyword). Raw PNM is char-only.
interpreted function, defined at i/pnm.i line 287
|
SEE ALSO:
|
pnm_colorize,
pnm_read
|
|