Article View: gnu.ghostscript.bug
Article #164Re: pstoppm.ps colormap still wrong?
From: L. Peter Deutsch
Date: Thu, 16 Apr 1992 15:20
Date: Thu, 16 Apr 1992 15:20
48 lines
2396 bytes
2396 bytes
Re <9204160601.AA05559@raisin-nut> <1992Apr16.051955.23318@msc.cornell.edu>: > Most color postscript output has > the rgb color definitions embedded within it, right? I don't understand what this question means. There is no definition or standard for "color PostScript output." Some file formats (e.g., PCX) use a colormap; some (e.g., PPM) use RGB values directly. > So why does pstoppm.ps define and use its own colormaps? pstoppm.ps uses a colormap only for 8-bit output, where it is unavoidable. > ppm24run even seems to use the default X colormap. ppm24run does not use a colormap: it outputs 24-bit values containing 8 bits each of unmapped R, G, and B. > Is there a newer version of pstoppm.ps that addresses this > problem, i.e. that uses the colors defined in the > postscript file? pstoppm.ps always respects the colors defined in the PostScript file. The question is how it represents them in the output: - ppm1run produces black-and-white output, so there is no issue. - ppm24run uses 8-bit-per-component true color as mentioned above. - ppm8run uses a colormap. The output of ppm8run is actually a questionable use of the PPM format. As I understand it, the format includes PBM (1 bit per pixel, black and white), PGM (N bits per pixel, gray levels), and PPM (3*N bits per pixel, true color), so 8 bits with a colormap is not really covered. The person who wrote the original version of pstoppm used an X colormap, but there is no particular reason for this. If you really want 8-bit, color-mapped output, you can change the color map (palette) in pstoppm easily enough: the format is documented under the makeimagedevice operator in language.doc. L. Peter Deutsch :: Aladdin Enterprises :: P.O. box 60264, Palo Alto, CA 94306 ghost@aladdin.com, ...decwrl!aladdin!ghost ; 415-322-0103 8-9 AM M-F/msg "Implementation is the sincerest form of flattery."
Technical Details
Message-ID:
<9204160820.1.UUL1.3#5127@aladdin.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!aladdin.COM!ghostReferences:
ghost@aladdin.COM (L. Peter Deutsch)Show Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!aladdin.COM!ghost From: ghost@aladdin.COM (L. Peter Deutsch) Subject: Re: pstoppm.ps colormap still wrong? Message-ID: <9204160820.1.UUL1.3#5127@aladdin.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet References: ghost@aladdin.COM (L. Peter Deutsch) Distribution: gnu Date: Thu, 16 Apr 1992 15:20:16 GMT Approved: bug-ghostscript@prep.ai.mit.edu Lines: 50