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

Home » Public Forums » archive » Re: 16 bit Tiff image
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 Tiff image [message #58925] Thu, 28 February 2008 00:09 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
On Feb 28, 5:01 pm, Stefano Scardigli <s.scardi...@libero.it> wrote:
> On Wed, 27 Feb 2008 16:12:24 -0700, David Fanning wrote:
>> Stefano Scardigli writes:
>
>>> better, thanks:
>
>>> IDL> img=read_tiff("V13A5.00.tif",/unsigned)
>>> IDL> help,img
>>> IMG LONG = Array[1000, 1000]
>>> IDL> print,max(img)
>>> 65535
>>> IDL> write_tiff,"prova.tiff",fix(img),/SHORT <---------
>>> IDL> help,img
>>> IMG LONG = Array[1000, 1000]
>>> IDL> print,max(img)
>>> 65535
>>> IDL> img2=read_tiff("prova.tiff",/unsigned)
>>> IDL> help,img2
>>> IMG2 LONG = Array[1000, 1000]
>>> IDL> print,max(img2)
>>> 255
>
>>> and now both img and img2 are LONG, but the reloaded img2 is still shrunk
>>> to 255 levels (ie 8 bit)!
>
>> I still don't think so. Are you being *very*
>> careful with your variables? You might try using
>> a .reset after you write the file and before you
>> read it again. I think it is not possible to get
>> what you are getting. :-)
>
>> Cheers,
>
>> David
>
> I'm very careful with my variables, and all the "code" I'm using is just
> this:
>
> img=read_tiff("V13A5.00.tif",/unsigned)
> help,img
> print,max(img)
> write_tiff,"prova.tiff",fix(img),/LONG
> help,img
> print,max(img)
> img2=read_tiff("prova.tiff",/unsigned)
> help,img2
> print,max(img2)

My IDL5.3 manuals say that /UNSIGNED is used to read in unsigned 16-
bit integer data and convert it to
unsigned 32-bit longword arrays. That keyword was obsolete by IDL 5.3.

Are you quite sure of the format of the data in your TIFF file? Have
your tried QUERY_TIFF and inspected the resultant information
structure?

Perhaps you could post the TIFF file somewhere for us to investigate?

Cheers,

Andrew
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Posting html form data with idlNetURL?
Next Topic: AX and AZ keywords of iSurface and iVolume

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

Current Time: Wed Oct 08 15:36:55 PDT 2025

Total time taken to generate the page: 0.00438 seconds