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 #58942 is a reply to message #58939] Wed, 27 February 2008 12:32 Go to previous messageGo to previous message
Stefano Scardigli is currently offline  Stefano Scardigli
Messages: 7
Registered: February 2008
Junior Member
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]

On Wed, 27 Feb 2008 12:12:16 -0700, David Fanning wrote:

> Stefano Scardigli writes:
>
>> I'm new in using IDL and I'm using an old version too.
>> I have a strange problem in writing 16 bit TIFF files
>>
>> this is the dump of my problem (I omitted the unuseful rows):
>>
>> IDL Version 5.1 (OSF alpha). Research Systems, Inc.
>> 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
>> IDL> print,max(img)
>> 255
>> IDL> img2=read_tiff("prova.tiff",/unsigned)
>> IDL> print,max(img2)
>> 255
>> IDL> help,img
>> IMG BYTE = Array[1000, 1000]
>> IDL> help,img2
>> IMG2 BYTE = Array[1000, 1000]
>> IDL>
>>
>> as you can see the file prova.tiff is a 8 bit image and also the array img
>> is changed from LONG to BYTE. I tried all the parameter of the write_tiff
>> procedure, but nothing change
>
> I think you forgot the SHORT keyword here:
>
> IDL> write_tiff,"prova.tiff",img
>
> This should be:
>
> IDL> write_tiff,"prova.tiff",img, /SHORT
>
> Cheers,
>
> David
[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: Fri Oct 10 03:50:54 PDT 2025

Total time taken to generate the page: 1.51527 seconds