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

Home » Public Forums » archive » Re: Printing Images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Printing Images [message #2644 is a reply to message #2632] Thu, 04 August 1994 09:50 Go to previous messageGo to previous message
sjt is currently offline  sjt
Messages: 72
Registered: November 1993
Member
Alan Tai (tai@rockola.larc.nasa.gov) wrote:
: I'm having some problems printing an image to a Postscript device. By
: using the same dimensions for the image as the X display (240 x 260),
: the plot comes out larger than it should be (weird--I kind of expected
: it to be a lot smaller). I tried re-scaling the image for the
: postscript device but ended up trying in vain to congrid a 12000 x
: 12000 byte array. Does anyone have any suggestions? Thanks.


: Alan

Let's suppose for the sake of argument you want your image to come out
10cm square on the print device and that it is in the array image, then a
suitable piece of code might be:

if ((!d.flags and 1) eq 1) then tv, image, xsize=10., ysize=10, /centi $
else tv, image

This checks if the device has scalable pixels (I think PS is currently
the only one that does, but it's as well to be general) [N.B. be careful
about the parentheses when working with !d.flags in this case it's O.K.
but for others missing them out will mess up precedences], and if the
pixels are scalable then it plots the image 10cm square, otherwise it
just plots it normally. The problem you were having is that for scalable
devices an image is by default plotted as big as possible.

--
James Tappin, School of Physics & Space Research
University of Birmingham
sjt@xun8.sr.bham.ac.uk
"If all else fails--read the instructions!"

O__
-- \/`
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Freebies & Giveaways
Next Topic: HELP!!! ^Z

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

Current Time: Sun Oct 12 11:12:45 PDT 2025

Total time taken to generate the page: 1.28209 seconds