From: Daniel J S. <dan...@ie...> - 2004-05-27 19:09:35
|
Petr Mikulik wrote: > Hi Daniel, > > > >>Well yes, that would be a logical thing to do. Limit to the nearest >>power of two. I'm seeing a few things in Ghostview notes, and also PNG >>notes: >> >>Keys recognized in PNG filter algorithms >>------------------------------------------------------------------------ >>Key Range Default >>------------------------------------------------------------------------ >>Colors <integer> 1 to 16 16 >>BitsPerComponent <integer> 1, 2, 4, 8, or 16 8 >> >> >> >>and >> >>Implements the Predictor=2 pixel-differencing option of the LZW filters. >>Recognized keys are: Colors <integer> (1 to 4, default=1) >>BitsPerComponent <integer> (1, 2, 4, or 8, default=8) >> >> >>But, I don't recall reading of any limitations in the PostScript >>standard when I was at the library. I will have to go there again. >> Anyway, even though I see some things that say 1,2,4,8, for both color >>and gray scale, GhostView seems to handle 1,2,4,8,12. So should I make >>it those restrictions? >> >> > >gnuplot graphs should print OK on usual (PS Level 2) printers, and should be >viewable by ghostview. > Yes, I think we can use that as a good benchmark. I will rewrite the driver so that it changes 3,5,6,7,9,10,11 bits to 4,8,12 appropriately. I am going to make 12 bits an option. Although I see most references on PostScript say 1,2,4,8, I'm almost certain I read in the Adobe standard text that up to 12 bits is allowed. You'd think that Adobe would have allowed some room for high res graphics. >Actually, what does BitsPerComponent mean? If it is 8, then R,G,B components >of the image will be restricted to 0..255, right? > Correct. Each channel, whether it be a single gray scale, or a color channel triple has 256 levels. For color, that is a lot. I know for the color images in X11, my graphics card has true color with 5 bits per channel. (Of course, one day I'll work on a machine with 8 bits per channel and be spoiled.) >I guess it won't be much problem -- gnuplot is not the tool to process >TrueColor photographs. > Well, I've never gotten wise about TrueColor. I think it is a trade name, not sure. But the general strategy is that instead of the lookup table, there is independent control of the channels. So PostScript's image scheme of 256 levels per color channel is essentially the same as TrueColor. In fact, here is a good reference which states that PostScript has TrueColor color images, but not TrueColor color plots: http://www.astro.princeton.edu/~esirko/idl_html_help/devices13.html >BTW, what happens if you convert a TrueColor photo to postscript, by >"convert" or another tool? The palette goes to 256 for each component? > Don't know. I think Ethan put some commands for TrueColor images in his gd.trm mods. >Please ask about 8 and 12 at gnuplot mailing list. There are postscript >experts there too. > Anyone know if 12 bits for color channels and/or gray scale of images is allowed in PostScript? Thanks, Dan |
From: Ethan M. <merritt@u.washington.edu> - 2004-05-27 19:43:38
|
On Thursday 27 May 2004 12:30 pm, Daniel J Sebald wrote: > Well, I've never gotten wise about TrueColor. I think it is a trade > name, not sure. It's a visual display mode in X11, as distinct from DirectColor or PseudoColor, which both use color maps. > Don't know. I think Ethan put some commands for TrueColor images in his > gd.trm mods. Maybe I should have used a different keyword. I just meant 8-bits per channel, rather than a color map. > Anyone know if 12 bits for color channels and/or gray scale of images is > allowed in PostScript? The PostScript Language Reference Manual says (p. 220): BitsPerComponent integer (Required) "Specifies the number of bits used to represent each color component. The number must be 1, 2, 3, 8, or 12. Only a single number may be specified. BitsPerComponent must be 1 in an image dictionary used with imagemask." -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
From: Ethan M. <merritt@u.washington.edu> - 2004-05-27 19:48:22
|
On Thursday 27 May 2004 12:43 pm, Ethan Merritt wrote: > The PostScript Language Reference Manual says (p. 220): > > BitsPerComponent integer (Required) > "Specifies the number of bits used to represent each color component. > The number must be 1, 2, 3, 8, or 12. Only a single number may be ^^^^ Pardon the typo. That should of course be "4" rather than "3" > specified. BitsPerComponent must be 1 in an image dictionary used > with imagemask." -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
From: Daniel J S. <dan...@ie...> - 2004-05-27 21:28:20
|
Daniel J Sebald wrote: > Anyone know if 12 bits for color channels and/or gray scale of images > is allowed in PostScript? I walked over to the library. 1, 2, 4 , 8 and 12 are part of the standard. Dan |