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

Home » Public Forums » archive » Re: Creating TIFF files from an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Creating TIFF files from an image [message #2798] Tue, 13 September 1994 06:08
gumley is currently offline  gumley
Messages: 10
Registered: May 1993
Junior Member
In article <Cw26qt.D9w@aston.ac.uk>, jollygw@aston.ac.uk (G W Jolly) wrote:

> I know it is probably in one or more of the manuals, but I spent several
> hours yesterday trying to save an image to a TIFF file using PV-WAVE
> Command Language. I was able to produce a window on screen with image I
> wanted using TVSCL on double precision data, but I couldn't use TVRD to
> read that image from the screen (I am using an IPX SUN Sparc-station
> running Solaris, Openwindows 3.3).

My experience is with IDL, but presumably it is applicable to PV-WAVE.
I assume you are working with a grey scale (or 8 bit lookup table) image
(TIFF only stores 8 bit images).

First load your image data (integer, long, float or whatever), then

plot, histogram( image, min = 0 ) ; (manually choose good minvalue and
maxvalue)
simage = bytscl( image, min = minvalue, max = maxvalue ) ; create byte
scaled image
tv, simage ; check that it looks ok
tiff_write, 'image.tiff', simage ; save it to a TIFF file

The only reason you would need to use TVRD is if you have drawn graphics or
text over the top of the image. In all other cases, just use the image
array itself. TVSCL automatically selects the maximum and minimum values
in the image, which is not necessarily what you want - look at the
histogram. This method works equally well for 24 bit RGB images.

--
Liam E. Gumley
NASA/GSFC Climate and Radiation Branch
Greenbelt MD, USA
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Creating TIFF files from an image
Next Topic: alpha-channel (clouds, fog,...)

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

Current Time: Wed Oct 08 13:42:19 PDT 2025

Total time taken to generate the page: 0.00491 seconds