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

Home » Public Forums » archive » Re: Reading a Tiff image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Reading a Tiff image [message #30776] Fri, 17 May 2002 15:05 Go to next message
thompson is currently offline  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 #30781 is a reply to message #30776] Fri, 17 May 2002 13:18 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler (rtowler@u.washington.edu) writes:

> I think you aren't making your window big enough.

I'd try displaying it with TVImage, /Keep_Aspect, image. :-)

Cheers,

David

P.S. Let's just say that I mucked around for an hour
and a half this morning looking at incredibly mixed
up colors with the TV command before I realized I
didn't know how to use it anymore. :-(

--
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 #30784 is a reply to message #30781] Fri, 17 May 2002 12:01 Go to previous messageGo to next message
Rick Towler is currently offline  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 Go to previous messageGo to next message
idlfreak is currently offline  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 Go to previous messageGo to next message
David Fanning is currently offline  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 Go to previous message
idlfreak is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Low quality with 'IDLgrClipboard' object
Next Topic: Reading a Tiff image

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

Current Time: Fri Oct 10 23:16:53 PDT 2025

Total time taken to generate the page: 0.23918 seconds