| Re: TV/postscript problem [message #13390 is a reply to message #13388] |
Thu, 05 November 1998 00:00  |
philip aldis
Messages: 13 Registered: October 1998
|
Junior Member |
|
|
R Balthazor wrote:
> However, each page of the postscript file is a horrible two-tone mess of
> black and white, looking like it is an 'overexposed' photograph and
> nothing like what was on the screen; and moreover, the TV,imageset is
> larger than and displaced from the desired position.
> - doing a single dataset read in case it was to do with multiple pages
> written to the postscript file - but still the horrible mess.
>
> - using CONTOUR,dataset1,/FILL as an approximation to TV,imageset1; this
> works perfectly (but I want more than 26 levels)
>
> - using WRITE_GIF; this works perfectly.
>
>
>
I'm not entirely sure if this is the problem and it may well be something a lot more
complicated than I can cope with - but I noticed that on your device, ..... you did not set
bits_per_pixel=8, failure to do this means that the postscript file can only print with 16
colours, which may have caused the problem.
A second point I noticed is to do with the colours available. When you are working on the
screen, you probably don't have all 256 colours available due to the window manager nicking
some, however in postscript there are always 256 colours available. There are two options to
correct this:
* If you want to scale the screen image to the number of colours available on the screen
and then scale the postscript output to the number of colours available there then use
TVSCL, instead of TV. This simply scales the image to the number of colours available.
* Or if you want both images to be scaled to the same value - the number of colours
available on the screen-, then after the set_plot, 'x' put scale_factor = !d.n_colors .
!d.n_colors, as you may have guessed, is simply the number of available colours. Then
when you tv the image, don't tv just the image but instead
TV, bytscl(image, top=scale_factor)
I hope this solves the problem, although there seems to be something more fundamental
because I haven't been able to explain the positioning problems or the black and white only.
I hope someone else can give you a slightly more informed answer than mine.
cheers,
Phil Aldis
|
|
|
|