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

Home » Public Forums » archive » performing a TVRD() on 24 bit 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
performing a TVRD() on 24 bit images... [message #9736] Thu, 14 August 1997 00:00 Go to previous message
tdarnell is currently offline  tdarnell
Messages: 3
Registered: August 1997
Junior Member
I am having some difficulty saving 24 bit TIFF files and was wondering
if anyone out there had a solution for me. I am constructing 24 bit
images of solar image data and am trying to save the resulting image
to a tiff file using TVRD(TRUE=1). I am writing each image to a PIXMAP
window and preforming the TVRD from the PIXMAP. Viewing the image in IDL
gives me exactly what I was expecting, however, once I view the image in an
external viewer, such as xv, the image appears to have lost some information
because it looks lossy. I am performing the TVRD off of the PIXMAP, not the
window showing the image, although, I tried it both ways and it doesn't seem
to matter. Here's my code:


WINDOW,0, /PIXMAP, XSIZE=xsz, YSIZE=ysz
DEVICE,SET_GRAPHICS_FUNCTION=7
loadct,1
STRETCH,50,200
TV,img2,xpos2,ypos2
loadct,3
STRETCH,20,255
TV,img1,xpos1,ypos1
final_img=TVRD(TRUE = 1)
;r=TVRD(CHANNEL=1)
;g=TVRD(CHANNEL=2)
;b=TVRD(CHANNEL=3)
DEVICE,SET_GRAPHICS_FUNCTION=3
WINDOW,1,XSIZE=(sz1(1)>sz2(1)), YSIZE=(sz1(2)>sz2(2)), /FREE
DEVICE,COPY=[0,0,xsz,ysz,0,0,0]
TIFF_WRITE,'test.tif',final_img
;TIFF_WRITE,'test.tif',RED=r,GREEN=g,BLUE=b

img1 and img2 are sent to this procedure by the calling program, they are
INTARR's of the same size. I noticed that when I do a TVRD on the PIXMAP,
final_img is of type LONARR and tiff_write casts arrays to BYTE. I'm not
sure if that is what is causing the problem or not. Any help would be much
appreciated, this problem has plagued me for some time now...


--
Tony Darnell (tdarnell@hao.ucar.edu) Boulder, CO
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Efficient comparison of arrays
Next Topic: Re: setenv,'x.x.x.x:0.1'

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

Current Time: Fri Oct 10 15:37:55 PDT 2025

Total time taken to generate the page: 0.48130 seconds