[comp.graphics] How do I separate color images into RGB channels.

jef@ace.ee.lbl.gov (Jef Poskanzer) (01/11/91)

In the referenced message, rthomson@dsd.es.com (Rich Thomson) wrote:
}In article <651@ub.d.umn.edu> halam1@ub.d.umn.edu (Haseen I. Alam) writes:
}> I need to get hold of some programs that will [...] allow me to separate
}>a color image into its RGB channels and display them separately.
}
}The Utah Raster Toolkit can do this (as well as PBM+, I believe).

PBMPLUS couldn't until about five minutes ago - I just whipped
up the necessary program.  Man page appended, source will appear
with the new version in the next few days.
---
Jef

  Jef Poskanzer  jef@well.sf.ca.us  {ucbvax, apple, hplabs}!well!jef
             "Where the hell did you get that idea, HAL?"


NAME
     ppmtorgb3 - separate a portable pixmap into  three  portable
     graymaps

SYNOPSIS
     ppmtorgb3 [ppmfile]

DESCRIPTION
     Reads a portable pixmap as  input.   Writes  three  portable
     graymaps as output, one each for red, green, and blue.

     The output filenames are constructed  by  taking  the  input
     filename, stripping off any extension, and appending ".red",
     ".grn", and ".blu".  For example, separating lena.ppm  would
     result  in  lena.red,  lena.grn, and lena.blu.  If the input
     comes from stdin, the names are noname.red, noname.grn,  and
     noname.blu.

SEE ALSO
     rgb3toppm(1), ppmtopgm(1), pgmtoppm(1), ppm(5), pgm(5)

AUTHOR
     Copyright (C) 1991 by Jef Poskanzer.