home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.graphics.pixutils
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!rpi!usenet.coe.montana.edu!osyjm
- From: osyjm@cs.montana.edu (Jaye Mathisen)
- Subject: This has got to be an easy one. Adding a colormap?
- Message-ID: <1992Dec22.012855.4165@coe.montana.edu>
- Sender: usenet@coe.montana.edu (USENET News System)
- Organization: CS
- Date: Tue, 22 Dec 1992 01:28:55 GMT
- Lines: 28
-
-
- I have an image file, generated by a program that knows nothing about pbmplus.
- I have a colormap file, which is of the form: 'color# Redval Grnval Bluval'
- for 256 colors. (Redval, Grnval and Bluval are integers between 0 and 255,
- but of course, it'd be easy to convert to a float if that would help).
-
- How do I take the image file, convert it to a GIF with the colormap applied?
-
- The grey part isn't a problem, 'rawtopgm x y file | pnmtogif > outfile', but
- how to get the map in there? I don't want pbm messing with what it thinks
- is black or white...
-
- pgmtoppm looks like it would almost do the trick, but specifying the
- colorspec stuff doesn't look quite like it does what I want.
-
- Alternatively, if you can tell me how to convert my above mentioned format
- color map files into PPM files so that I can use the -map option to pgmtoppm,
- that would work as well. At least, I think that would do what I want.
-
- Any help much appreciated, I have a ton of these files I need to go through.
-
- Back in the old days, the images were just loaded into the HP framebuffer,
- then a separate program loaded the colormap, now I want to dig out these
- old images and re-display 'em.
- --
- Jaye Mathisen, COE Systems Manager (406) 994-4780
- 410 Roberts Hall,Dept. of Computer Science
- Montana State University,Bozeman MT 59717 osyjm@cs.montana.edu
-