Received: from sgi.sgi.com (192.48.153.1) by cerious.com
 with SMTP (Apple Internet Mail Server 1.1.1); Fri, 13 Dec 1996 21:35:22 -0500
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by sgi.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id SAA03428; Fri, 13 Dec 1996 18:31:27 -0800
Received: (from daemon@localhost) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) id VAA11342 for tiff-list; Fri, 13 Dec 1996 21:05:48 GMT
Received: from sgi.sgi.com (sgi.engr.sgi.com [192.26.80.37]) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) via ESMTP id NAA11337 for <tiff-relay@relay.engr.sgi.com>; Fri, 13 Dec 1996 13:05:47 -0800
Received: from giraffe.asd.sgi.com (giraffe.asd.sgi.com [192.26.72.158]) by sgi.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA28442 for <tiff@sgi.com>; Fri, 13 Dec 1996 13:05:46 -0800
Received: from melange.engr.sgi.com by giraffe.asd.sgi.com via ESMTP (951211.SGI.8.6.12.PATCH1502/951211.SGI)
	 id MAA03064; Fri, 13 Dec 1996 12:57:21 -0800
Received: from localhost by melange.engr.sgi.com via SMTP (940816.SGI.8.6.9/950213.SGI.AUTOCF)
	 id MAA05818; Fri, 13 Dec 1996 12:57:20 -0800
Message-Id: <199612132057.MAA05818@melange.engr.sgi.com>
X-Mailer: exmh version 2.0alpha 12/3/96
To: frankkim@server.net
cc: tiff@sgi.com
Subject: Re: fillorder of decoded strips 
Reply-To: Sam Leffler <sam@relay.engr.SGI.COM>
In-reply-to: Your message of "Thu, 12 Dec 1996 18:44:32 EST."
             <199612122344.SAA09354@bluejay.server.net> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Fri, 13 Dec 1996 12:57:17 -0800
From: Sam Leffler <sam@melange.engr.sgi.com>
Sender: owner-tiff@relay.engr.SGI.COM
Precedence: bulk
Status: R

    To:  tiff@sgi.com
    Subject:  fillorder of decoded strips
    Date: Thu, 12 Dec 1996 18:44:32 EST
    From:  Frank Kim <frankkim@bluejay.server.net>

    Hi,
    
        According to the documentation of TIFFOpen:
    
        By default the library returns data in MSB2LSB bit order for
    compatibiltiy with older versions of this library.  Returning data in
    the bit order of the native cpu makes the most sense but also requires
    applications to check the value of the FillOrder tag; something they
    probably do not do right now.
    
        But according to the man page of TIFFReadEncodedStrip:
    
           The library attempts to hide bit- and  byte-ordering  dif-
           ferences  between the image and the native machine by con-
           verting data to the native machine order.  Bit reversal is
           done  if  the  FillOrder  tag  is  opposite  to the native
           machine bit order.
    
    So now I'm quite confused about how TIFFReadEncodedStrip works.  From a
    few experiments I've done it seems the decoded data I get back from
    doing a TIFFReadEncodedStrip has a fill order of MSB2LSB.  Should I
    assume it will always be like that as the TIFFOpen documentation
    implies?  Is there someway to know for sure what the fill order is of
    what TIFFReadEncodedStrip returns?
    
Data is returned in MSB2LSB bit order unless you explicitly override
it at TIFFOpen (when samples are >1 bit).  If this doesn't happen 
please provide an example.

        Sam


