comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Baffled by color postscript
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Baffled by color postscript [message #14567] Mon, 08 March 1999 00:00 Go to next message
David R. Wyble is currently offline  David R. Wyble
Messages: 4
Registered: April 1998
Junior Member
OK, I've been through many of David's great web pages, and through the portion
of his book related to the subject. Still, I get only monochrome output, or
none at all. Here is what I am doing. Note that this works perfectly for the X
display (that part between the X-only comments). Running on SGI Octane, IDL
5.0 MIPS

; x,y are 1xn vectors of data
; my_rgb is a 3xn byte values of RGBs for each respective
; element of x,y

; save current device, open postscript
thisdevice = !d.name
set_plot, 'PS', /copy
device, xsize=6, ysize=6, /inches, bits_per_pixel=24, /color

; plot the axes
plot, x, y, /nodata, xrange=[0,20], yrange=[0,20], title=chartTitle
saveColor = !p.color

;;;; X-only code starts
; loop through the data rgb_index() returns the 24 bit color
for i = 0, l-1 do begin
!p.color = rgb_index(my_rgb[0,i],my_rgb[1,i],my_rgb[2,i])
plots, x[i], y[i], psym=4
end

; plot a line at unity, make it the default color
!p.color = saveColor
oplot, [0,20],[0,20]

;;;; X-only code ends

; close it up and reset the device
device, /close_file
set_plot, thisdevice


Any ideas what is wrong? This code produces a postscript file with only the
axes and the line at [0,20],[0,20]. From experimenting with SYMSIZE, I believe
the points are actually plotting, but they are always white. (When I set
SYMSUZE=20, portions of the axes are overwritten, presumably by the large data points.)
Re: Baffled by color postscript [message #14606 is a reply to message #14567] Thu, 11 March 1999 00:00 Go to previous messageGo to next message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
David Fanning wrote:
>
> Kenneth P. Bowman (bowman@null.tamu) writes:
>
>> I think you can use *colors* in the "PLOT" part of the program, but not
>> 256^3 *different* colors (i.e., 24-bit).
>
> Exactly. And the question is "why not?". My usual clandestine
> sources are unusually quiet. :-)
>
> But I'm still not sure a printer can PRINT 24-bit color.
> It seems to me that even with the top-of-the-line color
> printers that there must be a translation between whatever
> color system into CMYK. Is it the contention of some of
> the PostScript experts here that this is a function of
> the printer's RIP?
sure. But CMYK doesn't have anything to do with 8 or 24 bit a priori.
Ideally, you could mix any portion of C with any amount of M with any
amount of Y and any amount of B to get *exactly* the color that you want
(then, one would have to specify color amounts as float numbers instead
of bytes). Just think of the painter who squeezes some tiny amopunt of
blue into the big white can ;-)
In fact, postscript allows you to do just this in process color mode.
Here is an excerpt from the following document:
http://www.adobe.com/supportservice/devrelations/PDFS/TN/500 2.EPSF_Spec_v2.0.pdf

4.4 COLOR COMMENTS
[...]

%%CMYKCustomColor: cyan magenta yellow black keyword
This provides an approximation to the custom color specified by keyword.
The four
components of cyan, magenta, yellow, and black must be specified as
numbers from 0 to
1 representing the percentage of that process color. These numbers are
exactly analogous
to the arguments to the setcmykcolor PostScript language operator. The
keyword follows
the same custom color naming conventions for the %%DocumentCustomColors
comment.
%%RGBCustomColor: red green blue keyword
This provides an approximation to the custom color specified by keyword.
The three
components of red, green, and blue must be specified as numbers from 0
to 1 representing
the percentage of that process color. These numbers are exactly
analogous to the arguments
to the setrgbcolor PostScript language operator. The keyword follows the
same custom
color naming conventions for the %%DocumentCustomColors comment.



On the hardware side, it's probably a matter of the price tag whether
you can get more than about 256 colors out of a printer. Browsing the
web, I read about some new Agfa machine that will actually produce
"photographs" of your digital data. Ordinary laser or ink printers (to
my knowledge) control the color brightness by the size of the dot
(rasterization), not the actual density of the toner or ink. Although
this is principally no limitation, in practice it is obviously very hard
to *reproducibly* create more than order 10 dot sizes at 300 or 600 dpi.

>
> Perhaps what we should be asking for is not 24-bit
> PostScript printing, but something that converts 24-bit
> colors into appropriate CMYK colors.
This is definitively what RSI could do. Take a look at Corel Draw or
Frame maker for example: they allow you to create color seperations in
CMYK mode. You can take those postscript files to a litho agency and
they will make printable transperancies out of it (4 per page of
output). That's the ultimate in quality.


>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155

--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
Re: Baffled by color postscript [message #14674 is a reply to message #14567] Sat, 13 March 1999 00:00 Go to previous messageGo to next message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <MPG.115074cdda275306989715@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:

> Kenneth P. Bowman (bowman@null.tamu) writes:
>
>> I think you can use *colors* in the "PLOT" part of the program, but not
>> 256^3 *different* colors (i.e., 24-bit).
>
> Exactly. And the question is "why not?". My usual clandestine
> sources are unusually quiet. :-)

Hi David,

I have it on relatively good authority (the RSI Support Tech who handled
my query some months back), that the PS device driver simply does not do
24-bit color except for bitmaps. She confirmed this with the development
team.

I don't believe that the PS interpreter in color printers has any problem
converting between RGB and CMYK. It already does that for 8-bit color,
which is the same fundamental problem.

The problem is in the IDL device driver, not in the printer.

Regards, Ken

--
Kenneth P. Bowman, Professor 409-862-4060
Department of Meteorology 409-862-4466 fax
Texas A&M University bowmanATcsrp.tamu.edu
College Station, TX 77843-3150 Change the AT to @
Re: Baffled by color postscript [message #14719 is a reply to message #14567] Fri, 19 March 1999 00:00 Go to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
David Fanning, davidf@dfanning.com writes:

> But I'm still not sure a printer can PRINT 24-bit color.

We have a Kodak dye-sublimation printer that does 300 dpi
continuous-tone with a nominal 8 bits per channel. Eyeball
measurements of the contrast and gamut suggest it's really more like 7
bits per channel but it's certainly much better than 8-bit colour.
More expensive machines with higher resolution and wider output gamut
are available, including ones which use lasers to write onto
photographic paper.

For us, not being able to print IDL-generated 24-bit output
without jaggies is a major tear jerker and is one of the reasons why
my love of IDL is strictly bounded.


Struan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3D thinning/skeleton computation in IDL
Next Topic: overlay vectors

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:01:34 PDT 2025

Total time taken to generate the page: 0.01138 seconds