[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need Help with PRINTER Problem
- Subject: Need Help with PRINTER Problem
- From: davidf(at)dfanning.com (David Fanning)
- Date: Mon, 21 Aug 2000 09:50:50 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20992
Hi Folks,
I think I have identified a bug that has been driving
me absolutely insane for the past 24-hours!
Now that I can faithfully reproduce the bug on my
printer, I want to try to rule out a printer driver
problem, rather than a problem with the PRINTER device.
I would like some help testing this, if you have a
minute or so.
Here is what I think is happening. If you go into
the PRINTER device and load a single color at *any*
color index, that color seems to be used for color
index 0 in subsequent graphics commands, even though
it is clear the color is not loaded in color index 0.
In the test program below, I load a yellow color
at color index 210. I then display an image that
is scaled into indices 0 to 199. Every pixel in
the image that has a 0 value is now displayed in
a yellow color!
I use DIALOG_PRINTERSETUP so I can write the
output to a file for viewing in GhostView, since
I've already gone through a ream of paper trying
to get to the bottom of this. In GhostView the
image pixels show up as yellow. On the black and
white output from my printer, they show up as a
very light color. You should have no problem seeing
that the image is incorrect, in any case.
Could you run the test program and tell me what
printer you are using and what you see. Thanks
very much.
Cheers,
David
************************************************************
PRO TEST
loadct, 0, ncolors=200
thisDevice = !D.Name
filename = Filepath(Subdir=['examples', 'data'], 'worldelv.dat')
Openr, lun, filename, /Get_lun
image = bytarr(360,360)
readu, lun, image
Free_lun, lun
ok = dialog_printersetup()
Set_Plot, 'PRINTER', /Copy
TVLCT, 255, 255, 0, 210
TV, BytScl(image, Top=199), xsize=5, ysize=5, /inches
Device, /Close
Set_Plot, thisDevice
END
**************************************************************
--
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