Received: from sgi.sgi.com (192.48.153.1) by cerious.com
 with SMTP (Apple Internet Mail Server 1.1.1); Wed, 12 Feb 1997 13:24:16 -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 KAA09665; Wed, 12 Feb 1997 10:14:18 -0800
Received: (from daemon@localhost) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) id QAA03349 for tiff-list; Wed, 12 Feb 1997 16:37:25 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 IAA03344 for <tiff-relay@relay.engr.sgi.com>; Wed, 12 Feb 1997 08:37:23 -0800
Received: from Starbase.NeoSoft.COM (starbase.neosoft.com [206.109.7.129]) by sgi.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id IAA15002 for <tiff@sgi.com>; Wed, 12 Feb 1997 08:37:21 -0800
Received: (from neuralog@localhost) by Starbase.NeoSoft.COM (8.8.4/8.8.3) id KAA19365 for tiff@sgi.com; Wed, 12 Feb 1997 10:37:20 -0600 (CST)
From: Neuralog <neuralog@Starbase.NeoSoft.COM>
Message-Id: <199702121637.KAA19365@Starbase.NeoSoft.COM>
Subject: Photometric interp and CCIT Compression
To: tiff@sgi.com
Date: Wed, 12 Feb 1997 10:37:20 -0600 (CST)
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-tiff@relay.engr.SGI.COM
Precedence: bulk


Hi,

If you have a MIN_IS_BLACK image (say uncompressed) and
run it through tiffcp to convert it to G4, the output
file is incorrectly inverted.

Reading the resultant file with, somehow the actual
image data has been converted to MIN_IS_WHITE but the
photometric tag is still MIB.

On the flip side, if tifflib reads a CCITT compressed file
the data is always handed over (from ReadScanLine()) as
MIW data regardless of the photometric tag.

Is this behavior considerred correct?  If some spec somewhere
says that CCITT compressed data shall be MIW then so be it, but
then tools like tiffcp (and all other tifflib based SW) must
take this into account.

I notice that TIFFRGBAImageBegin() does account for this
behavior in the latest libtif. (but not in previous
versions of libtiff)

        switch (colorchannels) {
        case 1:
            if (isCCITTCompression(tif))
                img->photometric = PHOTOMETRIC_MINISWHITE;
            else
                img->photometric = PHOTOMETRIC_MINISBLACK;
            break;

I don't see any of this in the docs, what am I missing?

Thanks,

Ken 
