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 #2632] Mon, 08 August 1994 09:53 Go to previous message
sbarrkum is currently offline  sbarrkum
Messages: 5
Registered: August 1994
Junior Member
In article <31qsi4$33v@reznor.larc.nasa.gov> tai@rockola.larc.nasa.gov (Alan Tai) writes:
> I'm having some problems printing an image to a Postscript device. By
> 12000 byte array. Does anyone have any suggestions? Thanks.


I use a little routine to rescale the pixels according to the device.
PS devices are capbale of high pixel density but the pixels can be rescaled.
Hence can makedo with less pixels.

pro mak_plot, x1,y1,x2,y2

; x1, y1 Bottom left Normalised coordinates
; x2, y2 Top right Normalised coordinates

data=fltarr(26,14) ; array to hold the image


;Plot image
arr_size=convert_coord(x2-x1+(x2-x1)*2/24,y2-y1+(y2-y1)*2/12 ,/Normal, /To_device)
if arr_size(0) gt 1000.0 then arr_size(0)=26.0 * 50.0 ; If array to large when
if arr_size(1) gt 700.0 then arr_size(1)=14.0 * 20.0 ; using PS device use smaller dimnsns
img=congrid(data,arr_size(0),arr_size(1))
if arr_size(0) ge arr_size(1) then smooth_width =0.1 * arr_size(1)
if arr_size(0) le arr_size(1) then smooth_width =0.1 * arr_size(0)
img=smooth(img, smooth_width)
tv, bytscl(img, tmin, tmax, top=255),x1, y1, /Normal, $
xsize = x2-x1, ysize = y2-y1


;Plot lat long grid and Manus coast line
plot,[140.5, 164.5], [-5.5,6.5], /Nodata, Xrange=[140.5, 164.5],YRange = [-5.5,6.5], $
/NOERASE, Linestyle=0, thick =3, XStyle=1 , Ystyle=1, color=backcolor, $
position=[x1,y1,x2,y2], charsize=0.6




end

===============
Hope this helps


Barr-Kumarakulasinghe
[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: Sat Oct 11 05:59:51 PDT 2025

Total time taken to generate the page: 1.52677 seconds