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

Home » Public Forums » archive » Re: write_tiff integer format
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: write_tiff integer format [message #62492] Fri, 12 September 2008 08:40 Go to previous message
edward.s.meinel@aero. is currently offline  edward.s.meinel@aero.
Messages: 52
Registered: February 2005
Member
On Sep 11, 12:05 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
> Geo logo wrote:
>> I am a newcomer of IDL, when I try use write_tiff to write a integer
>> type tiff,  the result always wrong.
>
>> input = intarr(1000,1000)
>> write_tiff, 'outimag.tif' , input
>
>> the result would be a byte type tiff file, and when I use
>
>>  write_tiff, 'outimag.tif' , input,/short, result will be  unsigned
>> int
>
>> write_tiff, 'outimag.tif' , input,/long, result will be long integer.
>
>> could somebody help me about how to output a integer type tiff file.
>> Thanks
>
> well, from the help file is seems to be impossible.
> If you have negative values, you might want to save as float..
>
> Jean

Aw, you guys give up too easily. Hey, Rocky, watch me pull a rabbit
out of my hat. Nuthin' up my sleeve:

image = FIX(READ_TIFF(file_name))

Presto!

Similarly, David asks:

> The more relevant question might be, given that life totally
> sucks, how does one convert back and forth between signed
> and unsigned integers?

Try this --

x = INTARR(3)
x = [-5, 0, 5]
PRINT, x, UINT(x), FIX(UINT(x))

Ed "Bullwinkle" Meinel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is there a 32/64-bit save file
Next Topic: tips for IDL 7?

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

Current Time: Wed Oct 08 19:10:02 PDT 2025

Total time taken to generate the page: 0.00485 seconds