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 #58935 is a reply to message #58934] Wed, 27 February 2008 15:03 Go to previous messageGo to previous message
Stefano Scardigli is currently offline  Stefano Scardigli
Messages: 7
Registered: February 2008
Junior Member
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)!

Stefano Scardigli



On Wed, 27 Feb 2008 14:01:12 -0700, Jean H wrote:

> Stefano Scardigli wrote:
>> nothing is changed
>>
>> 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",img,/SHORT
>> IDL> print,max(img)
>> 255
>> IDL> help,img
>> IMG BYTE = Array[1000, 1000]
>
> img is a long and you try to save it as an integer... have you tried
>
> write_tiff,"prova.tiff",fix(img),/SHORT
> or
> write_tiff,"prova.tiff",img,/LONG
> ?
>
> Jean
[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 20:52:37 PDT 2025

Total time taken to generate the page: 0.87924 seconds