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

Home » Public Forums » archive » Re: 16-bit tiffs
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: 16-bit tiffs [message #11092] Sat, 14 March 1998 00:00 Go to previous message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
Is this a color or black-and-white image?

I've been writing 24-bit color images as raw binary and then converting
them on my Mac to other formats using GraphicConverter (shareware). There
must be similar programs for PC's and Unix. GraphicConverter will batch
convert large numbers of files.

I write the files like this:

window -> DRAW, view ;Draw view in window
window -> GETPROPERTY, IMAGE_DATA = image ;Read image from window
;image will be (3,nx,ny) if your device is set to 24-bits
;This is for object graphics, for direct graphics, use TVRD().
FOR iplane = 0L, 2L DO $ ;Flip image right side up
image(iplane,*,*) = ROTATE(REFORM(image(iplane,*,*)),7)
OPENW, ounit, outfile, /GET_LUN ;Open new file for writing
WRITEU, ounit, image ;Write image to file
FREE_LUN, ounit ;Release out unit and file

You need to know the size of the image to read the raw file.

If you are only using 4-bits of the dynamic range (0-15), multiply each
8-bit image plane by 2^4=16 to scale to 0-255 before writing.

Regards, Ken Bowman

--
Kenneth P. Bowman, Assoc. Prof. 409-862-4060
Department of Meteorology 409-862-4132 fax
Texas A&M University bowmanATcsrp.tamu.edu
College Station, TX 77843-3150
[Message index]
 
Read Message
Read Message
Previous Topic: Re: REBIN Question
Next Topic: Re: Question about structure I/O in IDL

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

Current Time: Wed Oct 08 19:23:11 PDT 2025

Total time taken to generate the page: 0.00448 seconds