Re: Reading a Tiff image [message #30776] |
Fri, 17 May 2002 15:05  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
Strange, I have no problems reading that image on my computer:
IDL> print,!version
{ alpha OSF unix 5.4.1 Jan 16 2001 64 64}
IDL> a=read_tiff('8bit.tif') & help,a
A BYTE = Array[379, 1200]
Is the fact that this is 379x1200 instead of 1200x379 part of the problem?
An interesting thing is that when I open this file in xv, I get the error
message
Warning, TIFF directory is missing
required "StripByteCounts" field, calculating
from image length.
William Thompson
idlfreak@yahoo.com (Akhila) writes:
> nope, it does the samething as well. I can only see the last bit of
> the image. The image i'm using is loaded here.
> http://www.geocities.com/r_akhila/8bit.tif
> I'm sure that i'm missing out on something very simple.
> Akhila.
> David Fanning <david@dfanning.com> wrote in message news:<MPG.174e64d07cccf12b9898df@news.frii.com>...
>> Akhila (idlfreak@yahoo.com) writes:
>>
>>> I have a tiff image of size 1200x379. To open that file i wrote:
>>>
>>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>>> OPenR,lun, filename, /Get_Lun
>>> ReadU, lun, image
>>> Free_Lun, lun
>>> image = bytarr(1200,379)
>>> image = read_tiff(filename)
>>> tv, image
>>>
>>> The image that is opened is not the complete image. I guess i'm
>>> missing on something....Can anybody please help me with that.
>>
>> Oh, dear. How about something like this:
>>
>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>> image = Read_Tiff(filename)
>>
>> Does that work better?
>>
>> Cheers,
>>
>> David
|
|
|
|
Re: Reading a Tiff image [message #30784 is a reply to message #30781] |
Fri, 17 May 2002 12:01   |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
If you do this:
>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>> image = Read_Tiff(filename)
what does this print:
print, size(image)
I think you aren't making your window big enough.
-Rick
"Akhila" <idlfreak@yahoo.com> wrote in message
news:b1ad7b05.0205170930.12a9b783@posting.google.com...
> nope, it does the samething as well. I can only see the last bit of
> the image. The image i'm using is loaded here.
> http://www.geocities.com/r_akhila/8bit.tif
>
> I'm sure that i'm missing out on something very simple.
>
> Akhila.
>
> David Fanning <david@dfanning.com> wrote in message
news:<MPG.174e64d07cccf12b9898df@news.frii.com>...
>> Akhila (idlfreak@yahoo.com) writes:
>>
>>> I have a tiff image of size 1200x379. To open that file i wrote:
>>>
>>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>>> OPenR,lun, filename, /Get_Lun
>>> ReadU, lun, image
>>> Free_Lun, lun
>>> image = bytarr(1200,379)
>>> image = read_tiff(filename)
>>> tv, image
>>>
>>> The image that is opened is not the complete image. I guess i'm
>>> missing on something....Can anybody please help me with that.
>>
>> Oh, dear. How about something like this:
>>
>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>> image = Read_Tiff(filename)
>>
>> Does that work better?
>>
>> Cheers,
>>
>> David
|
|
|
Re: Reading a Tiff image [message #30791 is a reply to message #30784] |
Fri, 17 May 2002 10:30   |
idlfreak
Messages: 47 Registered: October 2001
|
Member |
|
|
nope, it does the samething as well. I can only see the last bit of
the image. The image i'm using is loaded here.
http://www.geocities.com/r_akhila/8bit.tif
I'm sure that i'm missing out on something very simple.
Akhila.
David Fanning <david@dfanning.com> wrote in message news:<MPG.174e64d07cccf12b9898df@news.frii.com>...
> Akhila (idlfreak@yahoo.com) writes:
>
>> I have a tiff image of size 1200x379. To open that file i wrote:
>>
>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>> OPenR,lun, filename, /Get_Lun
>> ReadU, lun, image
>> Free_Lun, lun
>> image = bytarr(1200,379)
>> image = read_tiff(filename)
>> tv, image
>>
>> The image that is opened is not the complete image. I guess i'm
>> missing on something....Can anybody please help me with that.
>
> Oh, dear. How about something like this:
>
> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
> image = Read_Tiff(filename)
>
> Does that work better?
>
> Cheers,
>
> David
|
|
|
Re: Reading a Tiff image [message #30798 is a reply to message #30791] |
Fri, 17 May 2002 00:53   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Akhila (idlfreak@yahoo.com) writes:
> I have a tiff image of size 1200x379. To open that file i wrote:
>
> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
> OPenR,lun, filename, /Get_Lun
> ReadU, lun, image
> Free_Lun, lun
> image = bytarr(1200,379)
> image = read_tiff(filename)
> tv, image
>
> The image that is opened is not the complete image. I guess i'm
> missing on something....Can anybody please help me with that.
Oh, dear. How about something like this:
filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
image = Read_Tiff(filename)
Does that work better?
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Reading a Tiff image [message #30852 is a reply to message #30776] |
Mon, 20 May 2002 11:14  |
idlfreak
Messages: 47 Registered: October 2001
|
Member |
|
|
I finally increased the window size as 379x1200 and the image is
displayed. But i think the window size is larger than my monitor and
so, i miss out either the beginning of the image or the last few rows.
Is there any way i can scale the image while displaying as in MATLAB?
Any help is welcome.
-Akhila.
thompson@orpheus.nascom.nasa.gov (William Thompson) wrote in message news:<ac3uql$d9g$1@skates.gsfc.nasa.gov>...
> Strange, I have no problems reading that image on my computer:
>
> IDL> print,!version
> { alpha OSF unix 5.4.1 Jan 16 2001 64 64}
> IDL> a=read_tiff('8bit.tif') & help,a
> A BYTE = Array[379, 1200]
>
> Is the fact that this is 379x1200 instead of 1200x379 part of the problem?
>
> An interesting thing is that when I open this file in xv, I get the error
> message
>
> Warning, TIFF directory is missing
> required "StripByteCounts" field, calculating
> from image length.
>
> William Thompson
>
>
>
> idlfreak@yahoo.com (Akhila) writes:
>
>> nope, it does the samething as well. I can only see the last bit of
>> the image. The image i'm using is loaded here.
>> http://www.geocities.com/r_akhila/8bit.tif
>
>> I'm sure that i'm missing out on something very simple.
>
>> Akhila.
>
>> David Fanning <david@dfanning.com> wrote in message news:<MPG.174e64d07cccf12b9898df@news.frii.com>...
>>> Akhila (idlfreak@yahoo.com) writes:
>>>
>>>> I have a tiff image of size 1200x379. To open that file i wrote:
>>>>
>>>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>>>> OPenR,lun, filename, /Get_Lun
>>>> ReadU, lun, image
>>>> Free_Lun, lun
>>>> image = bytarr(1200,379)
>>>> image = read_tiff(filename)
>>>> tv, image
>>>>
>>>> The image that is opened is not the complete image. I guess i'm
>>>> missing on something....Can anybody please help me with that.
>>>
>>> Oh, dear. How about something like this:
>>>
>>> filename = FilePath(Subdirectory = ['Akhila', 'Project'],'8bit.tif')
>>> image = Read_Tiff(filename)
>>>
>>> Does that work better?
>>>
>>> Cheers,
>>>
>>> David
|
|
|