- 1994.09.16 17:42 "Re: TIFF Bit Ordering Versus Fill Order", by Sam Leffler
- 1994.09.19 17:34 "Now that you mention bit order...", by Craig Jackson
- 1994.09.19 23:31 "Re: TIFF Bit Ordering Versus Fill Order", by Jim Arnold
1994.09.16 04:17 "TIFF Bit Ordering Versus Fill Order", by John M Davison
I am confused by the text on page 32 of the TIFF 6.0 Specification that describes the "FillOrder" tag. In particular, let's say I had
samples per pixel = 3
bits per sample = {3, 3, 3}
sample format = {1, 1, 1} (unsigned integral type)
PlanarConfiguration = 1 (chunky)
FillOrder = 1
image height = 1
image width = 2
no compression (1)
strip length = 2**32 - 1
and let's say that I am on a machine with 8-bit bytes.
Assuming that the pixel at (0, 0) has a value of {abc, def, ghi} and the pixel at (0, 1) has a value of {jkl, mno, pqr}, where a through r denote bit values such that, for example, a is the MSB of abc and c is the LSB of abc, what would the strip look like in memory? My guess is:
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
MSB LSB|MSB LSB|MSB etc.
| |
Byte 0 | Byte 1 | Byte 2
Now let's say that the FillOrder = 2. What does the strip look like now? My guess is:
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+
| g | h | d | e | f | a | b | c | p | m | n | o | j | k | l | i |...| q | r |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+
MSB LSB|MSB LSB| LSB
| |
Byte 0 | Byte 1 | Byte 2
I have a feeling that this is wrong, but page 32 of the TIFF 6.0 Specification is worded poorly enough that I can't tell.
Is it simpler than that? Should it have been the following?
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+
| h | g | f | e | d | c | b | a | p | o | n | m | l | k | j | i |...| r | q |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+
MSB LSB|MSB LSB| LSB
| |
Byte 0 | Byte 1 | Byte 2
What my question boils down to is this: what exactly does "FillOrder" mean?
--
John Davison
Electronic Mail: davisonj@ecn.purdue.edu
WWW Home Page: <http://en.ecn.purdue.edu:20002/~davisonj/HomePage.html>