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

Home » Public Forums » archive » Re: WRITE_TIFF
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: WRITE_TIFF [message #14792 is a reply to message #14791] Mon, 29 March 1999 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Joseph B. Gurman wrote:
>
> IDL> write_tiff, file + strmid(strtrim(10000 + i, 2), 1, 4), b0, 0, red =
> r, green = g, blue = b
>
> (that is, I explicitly tell write_tiff to assume the order is "0").
>
> Then, on the same system, I try:
>
> IDL> c = read_tiff('file.0957', r, g, b, order = order) & print, order
>
> The result I get is "4," not "0."
>
> If I were only using IDL, I would not be concerned, but when I try
> reading the same file on a Mac using Adobe Photoshop 5.0.2, I get an
> inverted (top to bottom) image.
>
> To confuse myself yet further, I decided to try to write the same
> image with an order paramater of "1." Once again, the order was read
> correctly with READ_TIFF, but once again, the image on the Mac was
> inverted.

From the OnLine help:

READ_TIFF:

ORDER
Set this keyword to a named variable that will contain the order
value from the TIFF file. This value is returned as 0 for images
written
bottom to top, and 1 for images written top to bottom. If an order
value does not appear in the TIFF file, an order of 1 is returned.


The ORDER keyword can return any of the following additional values
(depending on the source of the TIFF file):

1 top to bottom, left to right
2 top to bottom, right to left
3 bottom to top, right to left
4 bottom to top, left to right
5 top to bottom, left to right
6 top to bottom, right to left
7 bottom to top, right to left
8 bottom to top, left to right

WRITE_TIFF:

Order

This argument should be 0 if the image is stored from bottom to top
(the default). For images stored from top to bottom, this argument
should be 1.


CautionNot all TIFF readers honor the value of the Order argument.
IDL writes the value into the file, but many known readers ignore this
value. In such cases, we recommend that you convert the image to top
to bottom order with the REVERSE function and then set Order to 1.

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Previous Topic: Working with Specific Colors in IDL
Next Topic: ENVI ROI -> ASCII

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

Current Time: Tue Dec 02 20:05:45 PST 2025

Total time taken to generate the page: 0.01936 seconds