Return-Path: <tiff-bounces@lists.maptools.org>
Received: from mailgate105.isp.belgacom.be (mailgate105.isp.belgacom.be [195.238.6.86])
        by inmx019.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id l42DfuR4025996
        for <joris.at.lebbeke@skynet.be>; Wed, 2 May 2007 15:41:57 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 02 May 2007 15:37:55 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l42DL1wb024890;
	Wed, 2 May 2007 09:21:44 -0400
Received: from sw1.lexmark.com (sw1.lexmark.com [192.146.101.70])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l42DKwiK024886
	for <Tiff@lists.maptools.org>; Wed, 2 May 2007 09:20:58 -0400
To: Tiff@lists.maptools.org
Subject: [TIFF] CCITT RLE image is inverted
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.5.5 November 30, 2005
Message-ID: <OFD111CC98.A6849652-ON852572CF.0045AA0B-852572CF.00476A8B@lexmark.com>
From: tame@lexmark.com
Date: Wed, 2 May 2007 09:00:03 -0400
X-MIMETrack: Serialize by Router on smtp5b/Lex/Lexmark(Release 6.5.5|November
	30, 2005) at 05/02/2007 09:14:15,
	Serialize complete at 05/02/2007 09:14:15
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0832467087=="
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00002343
X-MSP-STORE: Wed, 02 May 2007 15:42:04 +0200
Status:   

This is a multipart message in MIME format.
--===============0832467087==
Content-Type: multipart/alternative;
	boundary="=_alternative 00476A88852572CF_="

This is a multipart message in MIME format.
--=_alternative 00476A88852572CF_=
Content-Type: text/plain; charset="US-ASCII"

Hi all,

I have a CCITT RLE compressed image with photometric interpretation of 
MinIsZero that appears "correct" in Windows Viewer, but appears "inverted" 
in GIMP, Photoshop and IrfanView. 

>From the output from libtiff, it appears that GIMP, et al is honoring the 
photometric interpretation, but Windows Viewer is not?  I wasn't sure if 
that was the case, or maybe libtiff is inverting the data before passing 
back to the caller.

I saw the same topic posted in 2004 that says that some viewers may not 
honor the photometric interpretation, but wasn't sure if that was the case 
here.

Here's the output from tiffinfo and tiffdump

TIFF Directory at offset 0x8 (8)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 200 Image Length: 200
  Resolution: 96, 96 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT RLE
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 8
  Planar Configuration: single image plane
  Page Number: 0-1
  Color Map: (present)
  Software: Paint Shop Pro 9.0
  DateTime: 2006:03:10 13:17:15
  Artist:

Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
SubFileType (254) LONG (4) 1<2>
ImageWidth (256) LONG (4) 1<200>
ImageLength (257) LONG (4) 1<200>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<2>
Photometric (262) SHORT (3) 1<1>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 25<521 537 585 759 824 882 1051 1104 1195 1361 
1393 1434 1506 1529 1564 1732 1816 1856 2026 2099 2173 2339 2388 2423 ...>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<8>
StripByteCounts (279) LONG (4) 25<16 48 174 65 58 169 53 91 166 32 41 72 
23 35 168 84 40 170 73 74 166 49 35 71 ...>
XResolution (282) RATIONAL (5) 1<96>
YResolution (283) RATIONAL (5) 1<96>
ResolutionUnit (296) SHORT (3) 1<2>
PageNumber (297) SHORT (3) 2<1 0>
Software (305) ASCII (2) 19<Paint Shop Pro 9.0\0>
DateTime (306) ASCII (2) 20<2006:03:10 13:17:15\0>
Artist (315) ASCII (2) 1<\0>
Colormap (320) SHORT (3) 6<65280 0 65280 0 65280 0>


Thanks Alot!

Elaine

--=_alternative 00476A88852572CF_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi all,</font>
<br>
<br><font size=2 face="sans-serif">I have a CCITT RLE compressed image
with photometric interpretation of MinIsZero that appears &quot;correct&quot;
in Windows Viewer, but appears &quot;inverted&quot; in GIMP, Photoshop
and IrfanView. &nbsp;</font>
<br>
<br><font size=2 face="sans-serif">From the output from libtiff, it appears
that GIMP, et al is honoring the photometric interpretation, but Windows
Viewer is not? &nbsp;I wasn't sure if that was the case, or maybe libtiff
is inverting the data before passing back to the caller.</font>
<br>
<br><font size=2 face="sans-serif">I saw the same topic posted in 2004
that says that some viewers may not honor the photometric interpretation,
but wasn't sure if that was the case here.</font>
<br>
<br><font size=2 face="sans-serif">Here's the output from tiffinfo and
tiffdump</font>
<br>
<br><font size=2 face="sans-serif">TIFF Directory at offset 0x8 (8)</font>
<br><font size=2 face="sans-serif">&nbsp; Subfile Type: multi-page document
(2 = 0x2)</font>
<br><font size=2 face="sans-serif">&nbsp; Image Width: 200 Image Length:
200</font>
<br><font size=2 face="sans-serif">&nbsp; Resolution: 96, 96 pixels/inch</font>
<br><font size=2 face="sans-serif">&nbsp; Bits/Sample: 1</font>
<br><font size=2 face="sans-serif">&nbsp; Compression Scheme: CCITT RLE</font>
<br><font size=2 face="sans-serif">&nbsp; Photometric Interpretation: min-is-black</font>
<br><font size=2 face="sans-serif">&nbsp; FillOrder: msb-to-lsb</font>
<br><font size=2 face="sans-serif">&nbsp; Orientation: row 0 top, col 0
lhs</font>
<br><font size=2 face="sans-serif">&nbsp; Samples/Pixel: 1</font>
<br><font size=2 face="sans-serif">&nbsp; Rows/Strip: 8</font>
<br><font size=2 face="sans-serif">&nbsp; Planar Configuration: single
image plane</font>
<br><font size=2 face="sans-serif">&nbsp; Page Number: 0-1</font>
<br><font size=2 face="sans-serif">&nbsp; Color Map: (present)</font>
<br><font size=2 face="sans-serif">&nbsp; Software: Paint Shop Pro 9.0</font>
<br><font size=2 face="sans-serif">&nbsp; DateTime: 2006:03:10 13:17:15</font>
<br><font size=2 face="sans-serif">&nbsp; Artist:</font>
<br>
<br><font size=2 face="sans-serif">Magic: 0x4949 &lt;little-endian&gt;
Version: 0x2a</font>
<br><font size=2 face="sans-serif">Directory 0: offset 8 (0x8) next 0 (0)</font>
<br><font size=2 face="sans-serif">SubFileType (254) LONG (4) 1&lt;2&gt;</font>
<br><font size=2 face="sans-serif">ImageWidth (256) LONG (4) 1&lt;200&gt;</font>
<br><font size=2 face="sans-serif">ImageLength (257) LONG (4) 1&lt;200&gt;</font>
<br><font size=2 face="sans-serif">BitsPerSample (258) SHORT (3) 1&lt;1&gt;</font>
<br><font size=2 face="sans-serif">Compression (259) SHORT (3) 1&lt;2&gt;</font>
<br><font size=2 face="sans-serif">Photometric (262) SHORT (3) 1&lt;1&gt;</font>
<br><font size=2 face="sans-serif">FillOrder (266) SHORT (3) 1&lt;1&gt;</font>
<br><font size=2 face="sans-serif">StripOffsets (273) LONG (4) 25&lt;521
537 585 759 824 882 1051 1104 1195 1361 1393 1434 1506 1529 1564 1732 1816
1856 2026 2099 2173 2339 2388 2423 ...&gt;</font>
<br><font size=2 face="sans-serif">Orientation (274) SHORT (3) 1&lt;1&gt;</font>
<br><font size=2 face="sans-serif">SamplesPerPixel (277) SHORT (3) 1&lt;1&gt;</font>
<br><font size=2 face="sans-serif">RowsPerStrip (278) SHORT (3) 1&lt;8&gt;</font>
<br><font size=2 face="sans-serif">StripByteCounts (279) LONG (4) 25&lt;16
48 174 65 58 169 53 91 166 32 41 72 23 35 168 84 40 170 73 74 166 49 35
71 ...&gt;</font>
<br><font size=2 face="sans-serif">XResolution (282) RATIONAL (5) 1&lt;96&gt;</font>
<br><font size=2 face="sans-serif">YResolution (283) RATIONAL (5) 1&lt;96&gt;</font>
<br><font size=2 face="sans-serif">ResolutionUnit (296) SHORT (3) 1&lt;2&gt;</font>
<br><font size=2 face="sans-serif">PageNumber (297) SHORT (3) 2&lt;1 0&gt;</font>
<br><font size=2 face="sans-serif">Software (305) ASCII (2) 19&lt;Paint
Shop Pro 9.0\0&gt;</font>
<br><font size=2 face="sans-serif">DateTime (306) ASCII (2) 20&lt;2006:03:10
13:17:15\0&gt;</font>
<br><font size=2 face="sans-serif">Artist (315) ASCII (2) 1&lt;\0&gt;</font>
<br><font size=2 face="sans-serif">Colormap (320) SHORT (3) 6&lt;65280
0 65280 0 65280 0&gt;</font>
<br>
<br>
<br><font size=2 face="sans-serif">Thanks Alot!</font>
<br>
<br><font size=2 face="sans-serif">Elaine</font>
<br>
--=_alternative 00476A88852572CF_=--

--===============0832467087==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============0832467087==--
