Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: 16 bit Tiff...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 14 Topic 5480 of 6457
Post > Topic >>

Re: 16 bit Tiff image

by Stefano Scardigli <s.scardigli@[EMAIL PROTECTED] > Feb 27, 2008 at 11:03 PM

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
 




 14 Posts in Topic:
16 bit Tiff image
Stefano Scardigli <s.s  2008-02-27 18:51:17 
Re: 16 bit Tiff image
David Fanning <news@[E  2008-02-27 12:12:16 
Re: 16 bit Tiff image
Stefano Scardigli <s.s  2008-02-27 20:32:01 
Re: 16 bit Tiff image
Jean H <jghasban@[EMAI  2008-02-27 14:01:12 
Re: 16 bit Tiff image
Stefano Scardigli <s.s  2008-02-27 23:03:16 
Re: 16 bit Tiff image
David Fanning <news@[E  2008-02-27 16:12:24 
Re: 16 bit Tiff image
Jean H <jghasban@[EMAI  2008-02-27 16:45:54 
Re: 16 bit Tiff image
Stefano Scardigli <s.s  2008-02-28 06:52:09 
Re: 16 bit Tiff image
Stefano Scardigli <s.s  2008-02-28 07:01:31 
Re: 16 bit Tiff image
Stefano Scardigli <s.s  2008-02-29 07:34:48 
Re: 16 bit Tiff image
David Fanning <news@[E  2008-02-27 14:26:30 
Re: 16 bit Tiff image
Andrew Cool <andrew.co  2008-02-28 00:09:06 
Re: 16 bit Tiff image
Spon <christoph.blau@[  2008-02-29 02:09:35 
Re: 16 bit Tiff image
Stefano Scardigli <s.s  2008-03-02 10:56:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 0:13:26 CST 2008.