Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-i.b-one.net (mx-i.one.com [91.198.169.56])
	by mail9.b-one.net (Postfix) with ESMTP id 83E40400107
	for <info@awaresystems.be>; Sat, 14 Mar 2009 03:06:51 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Score: 0.001
X-Spam-Level: 
X-Spam-Status: No, score=0.001 tagged_above=0 required=6
	tests=[HTML_MESSAGE=0.001]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-i.b-one.net (Postfix) with ESMTP id A654F8C12
	for <info@awaresystems.be>; Sat, 14 Mar 2009 03:06:50 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id C8ABD1D31A589;
	Fri, 13 Mar 2009 21:05:52 -0500 (EST)
Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28])
	by lists.maptools.org (Postfix) with ESMTP id E2E0F1D25F991
	for <tiff@lists.maptools.org>; Fri, 13 Mar 2009 21:04:03 -0500 (EST)
Received: by yw-out-2324.google.com with SMTP id 2so409476ywt.9
	for <tiff@lists.maptools.org>; Fri, 13 Mar 2009 19:04:02 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.136.10 with SMTP id j10mr3350078ybd.172.1236996242887; 
	Fri, 13 Mar 2009 19:04:02 -0700 (PDT)
Date: Fri, 13 Mar 2009 22:04:02 -0400
Message-ID: <a3f086580903131904xc686a93med828271c6d85875@mail.gmail.com>
From: Robert Gallop <robert.gallop@gmail.com>
To: tiff@lists.maptools.org
Subject: [Tiff] Confirming tiff integrity
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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="===============1465604082=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============1465604082==
Content-Type: multipart/alternative; boundary=000e0cd5d072a556ae04650aa119

--000e0cd5d072a556ae04650aa119
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I'm a sysadmin and using sun solaris 10 as a platform for several of our
applications.  One application renders out tiff files, but sometimes (due to
some code issues, fix is in the works, but may take the developers a while),
the multipage tiff files have some issues.

One of the issues is that during rendering of the multipage tiff, the
application fails to complete, and leaves a partial multipage tiff.  I've
found I can use either tiffinfo or tiffdump to detect these issues, since it
will throw an error I can grep out of the run.

The second issue is that during rendering the application will complete the
multipage tiff, but several, to all of the pages in the tiff will have solid
black squares where there should be an image.  This is the one I need help
on.

Is there anyway to determine (via script, executable, something I need to
compile, etc) if a multipage tiff contains a solid black square without
viewing the actual tiff file (what I currently have to do, hundreds of times
a month).  I'd think that somewhere in the tiff, there might be some clue
with a normal grey scale image, vs a pure solid black square on a page.
What I'd really like to be able to do is write a script, or have an
application that runs against a tiff and then gives a yes or no to any solid
black images contained in that multipage tiff.

The tiff files range from 1 page to several thousand.

Here is the header from one of the tiffs and the first couple directories:

Thanks for any help or ideas you might have!

Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 10466 (0x28e2)
ImageWidth (256) LONG (4) 1<1600>
ImageLength (257) LONG (4) 1<2060>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<1>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<186>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2060>
StripByteCounts (279) LONG (4) 1<10280>
XResolution (282) RATIONAL (5) 1<200>
YResolution (283) RATIONAL (5) 1<200>
Group4Options (293) LONG (4) 1<0>

Directory 1: offset 10466 (0x28e2) next 13700 (0x3584)
ImageWidth (256) LONG (4) 1<1600>
ImageLength (257) LONG (4) 1<2060>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<1>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<10644>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2060>
StripByteCounts (279) LONG (4) 1<3056>
XResolution (282) RATIONAL (5) 1<200>
YResolution (283) RATIONAL (5) 1<200>
Group4Options (293) LONG (4) 1<0>

Directory 2: offset 13700 (0x3584) next 30512 (0x7730)
ImageWidth (256) LONG (4) 1<1600>
ImageLength (257) LONG (4) 1<2060>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<1>
FillOrder (266) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 1<13878>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<2060>
StripByteCounts (279) LONG (4) 1<16633>
XResolution (282) RATIONAL (5) 1<200>
YResolution (283) RATIONAL (5) 1<200>
Group4Options (293) LONG (4) 1<0>

--000e0cd5d072a556ae04650aa119
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>I&#39;m a sysadmin and using sun solaris 10 as a platform for several =
of our applications.=A0 One application renders out tiff files, but sometim=
es (due to some code issues, fix is in the works, but may take the develope=
rs a while), the multipage tiff files have some issues.</div>

<div>=A0</div>
<div>One of the issues is that during rendering of the multipage tiff, the =
application fails to complete, and leaves a partial multipage tiff.=A0 I&#3=
9;ve found I can use either tiffinfo or tiffdump to detect these issues, si=
nce it will throw an error I can grep out of the run.</div>

<div>=A0</div>
<div>The second issue is that during rendering the application will complet=
e the multipage tiff, but several, to all of the pages in the tiff will hav=
e solid black squares where there should be an image.=A0 This is the one I =
need help on.</div>

<div>=A0</div>
<div>Is there anyway to determine (via script, executable, something I need=
 to compile, etc) if a multipage tiff contains a solid black square without=
 viewing the actual tiff file (what I currently have to do, hundreds of tim=
es a month).=A0 I&#39;d think that somewhere in the tiff, there might be so=
me clue with a normal grey scale image, vs a pure solid black square on a p=
age.=A0 What I&#39;d really like to be able to do is write a script, or hav=
e an application that runs against a tiff and then gives a yes or no to any=
 solid black images contained in that multipage tiff.</div>

<div>=A0</div>
<div>The tiff files range from 1 page to several thousand.</div>
<div>=A0</div>
<div>Here is the header from one of the tiffs and the first couple director=
ies:</div>
<div>=A0</div>
<div>Thanks for any help or ideas you might have!</div>
<div>=A0</div>
<div>Magic: 0x4949 &lt;little-endian&gt; Version: 0x2a<br>Directory 0: offs=
et 8 (0x8) next 10466 (0x28e2)<br>ImageWidth (256) LONG (4) 1&lt;1600&gt;<b=
r>ImageLength (257) LONG (4) 1&lt;2060&gt;<br>BitsPerSample (258) SHORT (3)=
 1&lt;1&gt;<br>
Compression (259) SHORT (3) 1&lt;4&gt;<br>Photometric (262) SHORT (3) 1&lt;=
1&gt;<br>FillOrder (266) SHORT (3) 1&lt;1&gt;<br>StripOffsets (273) LONG (4=
) 1&lt;186&gt;<br>SamplesPerPixel (277) SHORT (3) 1&lt;1&gt;<br>RowsPerStri=
p (278) LONG (4) 1&lt;2060&gt;<br>
StripByteCounts (279) LONG (4) 1&lt;10280&gt;<br>XResolution (282) RATIONAL=
 (5) 1&lt;200&gt;<br>YResolution (283) RATIONAL (5) 1&lt;200&gt;<br>Group4O=
ptions (293) LONG (4) 1&lt;0&gt;</div>
<div>=A0</div>
<div>Directory 1: offset 10466 (0x28e2) next 13700 (0x3584)<br>ImageWidth (=
256) LONG (4) 1&lt;1600&gt;<br>ImageLength (257) LONG (4) 1&lt;2060&gt;<br>=
BitsPerSample (258) SHORT (3) 1&lt;1&gt;<br>Compression (259) SHORT (3) 1&l=
t;4&gt;<br>
Photometric (262) SHORT (3) 1&lt;1&gt;<br>FillOrder (266) SHORT (3) 1&lt;1&=
gt;<br>StripOffsets (273) LONG (4) 1&lt;10644&gt;<br>SamplesPerPixel (277) =
SHORT (3) 1&lt;1&gt;<br>RowsPerStrip (278) LONG (4) 1&lt;2060&gt;<br>StripB=
yteCounts (279) LONG (4) 1&lt;3056&gt;<br>
XResolution (282) RATIONAL (5) 1&lt;200&gt;<br>YResolution (283) RATIONAL (=
5) 1&lt;200&gt;<br>Group4Options (293) LONG (4) 1&lt;0&gt;</div>
<div>=A0</div>
<div>Directory 2: offset 13700 (0x3584) next 30512 (0x7730)<br>ImageWidth (=
256) LONG (4) 1&lt;1600&gt;<br>ImageLength (257) LONG (4) 1&lt;2060&gt;<br>=
BitsPerSample (258) SHORT (3) 1&lt;1&gt;<br>Compression (259) SHORT (3) 1&l=
t;4&gt;<br>
Photometric (262) SHORT (3) 1&lt;1&gt;<br>FillOrder (266) SHORT (3) 1&lt;1&=
gt;<br>StripOffsets (273) LONG (4) 1&lt;13878&gt;<br>SamplesPerPixel (277) =
SHORT (3) 1&lt;1&gt;<br>RowsPerStrip (278) LONG (4) 1&lt;2060&gt;<br>StripB=
yteCounts (279) LONG (4) 1&lt;16633&gt;<br>
XResolution (282) RATIONAL (5) 1&lt;200&gt;<br>YResolution (283) RATIONAL (=
5) 1&lt;200&gt;<br>Group4Options (293) LONG (4) 1&lt;0&gt;</div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>

--000e0cd5d072a556ae04650aa119--

--===============1465604082==
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/
--===============1465604082==--
