8-bit Postscript problem (Will IDL and color Postscript *ever* get along?) [message #49210] |
Thu, 06 July 2006 14:51  |
brac00_at_PsU_dot_EdU
Messages: 1 Registered: July 2006
|
Junior Member |
|
|
Hello, I know this subject has (had) come up many times for over a
decade, and from what I can
tell on this newsgroup, seemed to be worked out to a great extent by
say 2004.
My problem is a 'classic' (?) where color postscript output is only 16
colors. That is, I'm
trying to make a Postscript color image, but I get 'blocky' colors -
i.e., only 16 of them.
But the twist (or me missing something) is that
1) I am using David Fanning's flexible TVIMAGE program (thanks!
great prog btw),
and
2) I explicitly set DEVICE, BITS=8, COLOR=1, ENCAPSULATED=1 after
doing SET_PLOT,'ps'.
A curious thing, though: using Fanning's COLORBAR program produces
256-color output on the
Postscript plot, so the bar looks nice and the plot is
crude/blocky/pixelly/ick. Also, doing a LOADCT
after setting to PS output does not help.
Could anyone help or offer any suggestions for this seemingly
ancient/solved problem?
Thanks,
-M. Kelly,
PSU Meteorology
-----------------------------
Hofstadter's Law:
"It [a task] always takes longer than you expect, even when you take
into
account Hofstadter's Law."
|
|
|
Re: 8-bit Postscript problem (Will IDL and color Postscript *ever* get along?) [message #49260 is a reply to message #49210] |
Tue, 11 July 2006 11:07  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
M-K writes:
> Oddly, doing
> set_plot, 'ps' & !P.Font=0
> DEVICE, BITS_PER_PIXEL=8, COLOR=1, FILE=fnam, $
> /ENCAPS, XSIZE=7,YSIZE=4,/INCHES
> Help,/DEVICE
>
> confirms 8 bits per pixel; the output is:
>
> Current graphics device: PS
> Mode: Portrait, Encapsulated, EPSI Preview Disabled, Color Enabled
> Output Color Model: RGB
> ... { offset, size, preview stuff here, Scale Factor is 1 }
> ...
> Font: Helvetica TrueType Font: <default>
> # bits per image pixel: 8
> Font Mapping: ...
>
> So somehow the colorbar output is nice, but the TVImage output
> is pixelly or not enough colors, despite BITS_PER_PIXEL=8.
> Could there be a pixel scaling problem with Postscript?
If there is, it would be the first time I've ever heard of it.
I'll be honest, I am completely mystified. I guess the only
thing to try now is prayer, with maybe a histogram plot of
the data you are trying to display as an image to see if
there is something wrong there. But it looks to me like you are
doing all the right things. Strange... PostScript is always
ultra reliable. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|