Re: 16-bit tiffs [message #11092] |
Sat, 14 March 1998 00:00  |
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
|
|
|