Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-d.one.com (mx-d.one.com [91.198.169.51])
	by mail6.local (Postfix) with ESMTP id C93328014FAC9
	for <filtered@awaresystems.be>; Mon, 10 Jun 2013 11:52:03 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-d: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.215.53 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53])
	by mx-d.one.com (Postfix) with ESMTP id 50C40FB8F0C
	for <filtered@awaresystems.be>; Mon, 10 Jun 2013 09:52:03 +0000 (UTC)
Received: by mail-la0-f53.google.com with SMTP id fs12so4009489lab.40
        for <filtered@awaresystems.be>; Mon, 10 Jun 2013 02:52:02 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-forwarded-to:x-forwarded-for:delivered-to:domainkey-status
         :x-gmail-fetch-info:delivered-to:x-virus-scanned:x-amavis-alert
         :x-greylist:mime-version:date:message-id:from:to:subject:x-beenthere
         :x-mailman-version:precedence:list-id:list-unsubscribe:list-archive
         :list-post:list-help:list-subscribe:content-type:mime-version:sender
         :errors-to;
        bh=nSZAs2JnRHC1AdZ2Fg98MaLZhF2vs0joWVNKGrC0YVE=;
        b=JgNsSFu/dih4uY8H/GKvdjcKsz0fCgx/yA2Aj5DUYuHHCWXuUfJTty1X73szvEU5a6
         M4xB1kMaBJMFrtZQah5aUIBxyvd04L7sJp2ei4Tv76hznjm8hg7Wo93uV8BbYnGkHikd
         1+/Xx9UbiVubFoj3iRtYZqeSNvPmOtdYI6WIw8vALgEQRbQ7Mqb9Qz9FpPnK7FrNePIg
         00gnzsAtlAtg4ZTNVoHjWOyT11ftoky39vHE6y080KEas4+fzOhbHaZgs/eyFDMSQIof
         sCAYHJVvPXGnXJ2rZrPGZfZKnPtndQz33dZwdtUC9t/fjwJwJpdpVs3kr3C3ea1ItKl/
         j66Q==
X-Received: by 10.112.138.230 with SMTP id qt6mr6209765lbb.34.1370857922795;
        Mon, 10 Jun 2013 02:52:02 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.114.82.70 with SMTP id g6csp80440ldy;
        Mon, 10 Jun 2013 02:52:02 -0700 (PDT)
X-Received: by 10.112.54.161 with SMTP id k1mr6213579lbp.21.1370857921570;
        Mon, 10 Jun 2013 02:52:01 -0700 (PDT)
DomainKey-Status: bad format
Received-SPF: neutral (google.com: 195.47.247.76 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=195.47.247.76;
Received: by 10.152.97.116 with POP3 id dz20mf2571012lab.33;
        Mon, 10 Jun 2013 02:52:00 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx05.one.com (mx05.one.com [195.47.247.76])
	by mail6.local (Postfix) with ESMTP id 85A8B8014FAC9
	for <info@awaresystems.be>; Mon, 10 Jun 2013 11:33:47 +0200 (CEST)
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx05.one.com (Postfix) with ESMTP id 402B6581BB8
	for <info@awaresystems.be>; Mon, 10 Jun 2013 09:33:46 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 3145635C032;
	Mon, 10 Jun 2013 04:33:07 -0500 (EST)
Received: from mail-lb0-f194.google.com (mail-lb0-f194.google.com
	[209.85.217.194])
	by lists.maptools.org (Postfix) with ESMTPS id 4CDE435C02E
	for <tiff@lists.maptools.org>; Mon, 10 Jun 2013 04:31:54 -0500 (EST)
Received: by mail-lb0-f194.google.com with SMTP id 13so424995lba.1
	for <tiff@lists.maptools.org>; Mon, 10 Jun 2013 02:31:54 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.152.42.236 with SMTP id r12mr4583455lal.46.1370856713700;
	Mon, 10 Jun 2013 02:31:53 -0700 (PDT)
Received: by 10.114.176.162 with HTTP; Mon, 10 Jun 2013 02:31:53 -0700 (PDT)
Date: Mon, 10 Jun 2013 12:31:53 +0300
Message-ID: <CAL5BmcSAZLK=2KTidKAh4OZD=8H1V3u5adTeak8Pwmh9zxXVXQ@mail.gmail.com>
From: Christos Charalambous <chrischaralambous80@gmail.com>
To: tiff@lists.maptools.org
Subject: [Tiff] Detection of corrupted TIFF files bug
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="===============0893087825=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0893087825==
Content-Type: multipart/alternative; boundary=001a11c34b9a75485304dec9739f

--001a11c34b9a75485304dec9739f
Content-Type: text/plain; charset=ISO-8859-1

Hi everyone !

I've used this code by LibTIFF to detect if TIFF files in a folder are
corrupted or not . I want to detect images that can be opened but are
corrupted .

This is the code i used to modify to my needs


using System.Windows.Forms;

using BitMiracle.LibTiff.Classic;

namespace BitMiracle.LibTiff.Samples{
    public static class DetermineCorruptPage
    {
        public static void Main()
        {
            using (Tiff image = Tiff.Open(@"Sample Data\127.tif", "r"))
            {
                if (image == null)
                {
                    MessageBox.Show("Could not load incoming image");
                    return;
                }
                int numberOfDirectories = image.NumberOfDirectories();
                for (int i = 0; i < numberOfDirectories; ++i)
                {
                    image.SetDirectory((short)i);

                    int width = image.GetField(TiffTag.IMAGEWIDTH)[0].ToInt();
                    int height = image.GetField(TiffTag.IMAGELENGTH)[0].ToInt();

                    int imageSize = height * width;
                    int[] raster = new int[imageSize];

                    if (!image.ReadRGBAImage(width, height, raster, true))
                    {
                        MessageBox.Show("Page " + i + " is corrupted");
                        return;
                    }
                }
            }
        }
    }}

The problem is that although some of the images are detected correctly
as corrupted , others which are scanned correctly are detected as
corrupted as well . Those that are wrongly detected as corrupted ,
have a big resolution , but i don't think that this has anything to do
with it .

Kind regards


Chris

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

<div dir=3D"ltr">Hi everyone !<div><br></div><div><p style=3D"margin:0px 0p=
x 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:b=
oth;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,&#39;Liberation=
 Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
I&#39;ve used this code by LibTIFF to detect if TIFF files in a folder are =
corrupted or not . I want to detect images that can be opened but are corru=
pted .</p><p style=3D"margin:0px 0px 1em;padding:0px;border:0px;font-size:1=
4px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0=
);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-se=
rif;line-height:18px">
This is the code i used to modify to my needs</p><p style=3D"margin:0px 0px=
 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:bo=
th;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,&#39;Liberation =
Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
<br></p><pre class=3D"" style=3D"margin-top:0px;margin-bottom:10px;padding:=
5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(=
238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#3=
9;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans =
Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;ma=
x-height:600px;color:rgb(0,0,0);line-height:18px">
<code style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;fo=
nt-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mo=
no&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;=
Courier New&#39;,monospace,serif"><span class=3D"" style=3D"margin:0px;padd=
ing:0px;border:0px;vertical-align:baseline;background-color:transparent">us=
ing </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vert=
ical-align:baseline;background-color:transparent;color:rgb(43,145,175)">Sys=
tem</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;verti=
cal-align:baseline;background-color:transparent">.</span><span class=3D"" s=
tyle=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgroun=
d-color:transparent;color:rgb(43,145,175)">Windows</span><span class=3D"" s=
tyle=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgroun=
d-color:transparent">.</span><span class=3D"" style=3D"margin:0px;padding:0=
px;border:0px;vertical-align:baseline;background-color:transparent;color:rg=
b(43,145,175)">Forms</span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent">;</span><=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:b=
aseline;background-color:transparent">

using </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;ve=
rtical-align:baseline;background-color:transparent;color:rgb(43,145,175)">B=
itMiracle</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px=
;vertical-align:baseline;background-color:transparent">.</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent;color:rgb(43,145,175)">LibTiff</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent">.</span><span class=3D"" style=3D"margin:0px;pa=
dding:0px;border:0px;vertical-align:baseline;background-color:transparent;c=
olor:rgb(43,145,175)">Classic</span><span class=3D"" style=3D"margin:0px;pa=
dding:0px;border:0px;vertical-align:baseline;background-color:transparent">=
;</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertica=
l-align:baseline;background-color:transparent">

namespace </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0p=
x;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175=
)">BitMiracle</span><span class=3D"" style=3D"margin:0px;padding:0px;border=
:0px;vertical-align:baseline;background-color:transparent">.</span><span cl=
ass=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline=
;background-color:transparent;color:rgb(43,145,175)">LibTiff</span><span cl=
ass=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline=
;background-color:transparent">.</span><span class=3D"" style=3D"margin:0px=
;padding:0px;border:0px;vertical-align:baseline;background-color:transparen=
t;color:rgb(43,145,175)">Samples</span><span class=3D"" style=3D"margin:0px=
;padding:0px;border:0px;vertical-align:baseline;background-color:transparen=
t">
</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical=
-align:baseline;background-color:transparent">{</span><span class=3D"" styl=
e=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-c=
olor:transparent">
    </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vert=
ical-align:baseline;background-color:transparent;color:rgb(0,0,139)">public=
</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical=
-align:baseline;background-color:transparent"> </span><span class=3D"" styl=
e=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-c=
olor:transparent;color:rgb(0,0,139)">static</span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent"> </span><span class=3D"" style=3D"margin:0px;padding:0px;bord=
er:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,1=
39)">class</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0p=
x;vertical-align:baseline;background-color:transparent"> </span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent;color:rgb(43,145,175)">DetermineCorruptPage</spa=
n><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-alig=
n:baseline;background-color:transparent">
    </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vert=
ical-align:baseline;background-color:transparent">{</span><span class=3D"" =
style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgrou=
nd-color:transparent">
        </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;=
vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">pu=
blic</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vert=
ical-align:baseline;background-color:transparent"> </span><span class=3D"" =
style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgrou=
nd-color:transparent;color:rgb(0,0,139)">static</span><span class=3D"" styl=
e=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-c=
olor:transparent"> </span><span class=3D"" style=3D"margin:0px;padding:0px;=
border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0=
,0,139)">void</span><span class=3D"" style=3D"margin:0px;padding:0px;border=
:0px;vertical-align:baseline;background-color:transparent"> </span><span cl=
ass=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline=
;background-color:transparent;color:rgb(43,145,175)">Main</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent">()</span><span class=3D"" style=3D"margin:0px;p=
adding:0px;border:0px;vertical-align:baseline;background-color:transparent"=
>
        </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;=
vertical-align:baseline;background-color:transparent">{</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent">
            using </span><span class=3D"" style=3D"margin:0px;padding:0px;b=
order:0px;vertical-align:baseline;background-color:transparent">(</span><sp=
an class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:bas=
eline;background-color:transparent;color:rgb(43,145,175)">Tiff</span><span =
class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseli=
ne;background-color:transparent"> image </span><span class=3D"" style=3D"ma=
rgin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:tr=
ansparent">=3D</span><span class=3D"" style=3D"margin:0px;padding:0px;borde=
r:0px;vertical-align:baseline;background-color:transparent"> </span><span c=
lass=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baselin=
e;background-color:transparent;color:rgb(43,145,175)">Tiff</span><span clas=
s=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;b=
ackground-color:transparent">.</span><span class=3D"" style=3D"margin:0px;p=
adding:0px;border:0px;vertical-align:baseline;background-color:transparent;=
color:rgb(43,145,175)">Open</span><span class=3D"" style=3D"margin:0px;padd=
ing:0px;border:0px;vertical-align:baseline;background-color:transparent">(<=
/span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-=
align:baseline;background-color:transparent;color:rgb(128,0,0)">@&quot;Samp=
le Data\127.tif&quot;</span><span class=3D"" style=3D"margin:0px;padding:0p=
x;border:0px;vertical-align:baseline;background-color:transparent">,</span>=
<span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:=
baseline;background-color:transparent"> </span><span class=3D"" style=3D"ma=
rgin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:tr=
ansparent;color:rgb(128,0,0)">&quot;r&quot;</span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent">))</span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent">
            </span><span class=3D"" style=3D"margin:0px;padding:0px;border:=
0px;vertical-align:baseline;background-color:transparent">{</span><span cla=
ss=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;=
background-color:transparent">
                </span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,=
139)">if</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;=
vertical-align:baseline;background-color:transparent"> </span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent">(</span><span class=3D"" style=3D"margin:0px;pa=
dding:0px;border:0px;vertical-align:baseline;background-color:transparent">=
image </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;ve=
rtical-align:baseline;background-color:transparent">=3D=3D</span><span clas=
s=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;b=
ackground-color:transparent"> </span><span class=3D"" style=3D"margin:0px;p=
adding:0px;border:0px;vertical-align:baseline;background-color:transparent;=
color:rgb(0,0,139)">null</span><span class=3D"" style=3D"margin:0px;padding=
:0px;border:0px;vertical-align:baseline;background-color:transparent">)</sp=
an><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-ali=
gn:baseline;background-color:transparent">
                </span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent">{</span><span=
 class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:basel=
ine;background-color:transparent">
                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
43,145,175)">MessageBox</span><span class=3D"" style=3D"margin:0px;padding:=
0px;border:0px;vertical-align:baseline;background-color:transparent">.</spa=
n><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-alig=
n:baseline;background-color:transparent;color:rgb(43,145,175)">Show</span><=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:b=
aseline;background-color:transparent">(</span><span class=3D"" style=3D"mar=
gin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:tra=
nsparent;color:rgb(128,0,0)">&quot;Could not load incoming image&quot;</spa=
n><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-alig=
n:baseline;background-color:transparent">);</span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent">
                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
0,0,139)">return</span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent">;</span><span=
 class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:basel=
ine;background-color:transparent">
                </span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent">}</span><span=
 class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:basel=
ine;background-color:transparent">
                </span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,1=
45,175)">int</span><span class=3D"" style=3D"margin:0px;padding:0px;border:=
0px;vertical-align:baseline;background-color:transparent"> numberOfDirector=
ies </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vert=
ical-align:baseline;background-color:transparent">=3D</span><span class=3D"=
" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgr=
ound-color:transparent"> image</span><span class=3D"" style=3D"margin:0px;p=
adding:0px;border:0px;vertical-align:baseline;background-color:transparent"=
>.</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertic=
al-align:baseline;background-color:transparent;color:rgb(43,145,175)">Numbe=
rOfDirectories</span><span class=3D"" style=3D"margin:0px;padding:0px;borde=
r:0px;vertical-align:baseline;background-color:transparent">();</span><span=
 class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:basel=
ine;background-color:transparent">
                </span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,=
139)">for</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px=
;vertical-align:baseline;background-color:transparent"> </span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent">(</span><span class=3D"" style=3D"margin:0px;pa=
dding:0px;border:0px;vertical-align:baseline;background-color:transparent;c=
olor:rgb(43,145,175)">int</span><span class=3D"" style=3D"margin:0px;paddin=
g:0px;border:0px;vertical-align:baseline;background-color:transparent"> i <=
/span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-=
align:baseline;background-color:transparent">=3D</span><span class=3D"" sty=
le=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-=
color:transparent"> </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
128,0,0)">0</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0=
px;vertical-align:baseline;background-color:transparent">;</span><span clas=
s=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;b=
ackground-color:transparent"> i </span><span class=3D"" style=3D"margin:0px=
;padding:0px;border:0px;vertical-align:baseline;background-color:transparen=
t">&lt;</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;v=
ertical-align:baseline;background-color:transparent"> numberOfDirectories</=
span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-a=
lign:baseline;background-color:transparent">;</span><span class=3D"" style=
=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-co=
lor:transparent"> </span><span class=3D"" style=3D"margin:0px;padding:0px;b=
order:0px;vertical-align:baseline;background-color:transparent">++</span><s=
pan class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:ba=
seline;background-color:transparent">i</span><span class=3D"" style=3D"marg=
in:0px;padding:0px;border:0px;vertical-align:baseline;background-color:tran=
sparent">)</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0p=
x;vertical-align:baseline;background-color:transparent">
                </span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent">{</span><span=
 class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:basel=
ine;background-color:transparent">
                    image</span><span class=3D"" style=3D"margin:0px;paddin=
g:0px;border:0px;vertical-align:baseline;background-color:transparent">.</s=
pan><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-al=
ign:baseline;background-color:transparent;color:rgb(43,145,175)">SetDirecto=
ry</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertic=
al-align:baseline;background-color:transparent">((</span><span class=3D"" s=
tyle=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgroun=
d-color:transparent;color:rgb(0,0,139)">short</span><span class=3D"" style=
=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-co=
lor:transparent">)</span><span class=3D"" style=3D"margin:0px;padding:0px;b=
order:0px;vertical-align:baseline;background-color:transparent">i</span><sp=
an class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:bas=
eline;background-color:transparent">);</span><span class=3D"" style=3D"marg=
in:0px;padding:0px;border:0px;vertical-align:baseline;background-color:tran=
sparent">

                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
43,145,175)">int</span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent"> width </span=
><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align=
:baseline;background-color:transparent">=3D</span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent"> image</span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent">.</span><=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:b=
aseline;background-color:transparent;color:rgb(43,145,175)">GetField</span>=
<span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:=
baseline;background-color:transparent">(</span><span class=3D"" style=3D"ma=
rgin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:tr=
ansparent;color:rgb(43,145,175)">TiffTag</span><span class=3D"" style=3D"ma=
rgin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:tr=
ansparent">.</span><span class=3D"" style=3D"margin:0px;padding:0px;border:=
0px;vertical-align:baseline;background-color:transparent">IMAGEWIDTH</span>=
<span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:=
baseline;background-color:transparent">)[</span><span class=3D"" style=3D"m=
argin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:t=
ransparent;color:rgb(128,0,0)">0</span><span class=3D"" style=3D"margin:0px=
;padding:0px;border:0px;vertical-align:baseline;background-color:transparen=
t">].</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;ver=
tical-align:baseline;background-color:transparent;color:rgb(43,145,175)">To=
Int</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;verti=
cal-align:baseline;background-color:transparent">();</span><span class=3D""=
 style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgro=
und-color:transparent">
                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
43,145,175)">int</span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent"> height </spa=
n><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-alig=
n:baseline;background-color:transparent">=3D</span><span class=3D"" style=
=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-co=
lor:transparent"> image</span><span class=3D"" style=3D"margin:0px;padding:=
0px;border:0px;vertical-align:baseline;background-color:transparent">.</spa=
n><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-alig=
n:baseline;background-color:transparent;color:rgb(43,145,175)">GetField</sp=
an><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-ali=
gn:baseline;background-color:transparent">(</span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent;color:rgb(43,145,175)">TiffTag</span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent">.</span><span class=3D"" style=3D"margin:0px;padding:0px;bord=
er:0px;vertical-align:baseline;background-color:transparent">IMAGELENGTH</s=
pan><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-al=
ign:baseline;background-color:transparent">)[</span><span class=3D"" style=
=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-co=
lor:transparent;color:rgb(128,0,0)">0</span><span class=3D"" style=3D"margi=
n:0px;padding:0px;border:0px;vertical-align:baseline;background-color:trans=
parent">].</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0p=
x;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175=
)">ToInt</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;=
vertical-align:baseline;background-color:transparent">();</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent">

                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
43,145,175)">int</span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent"> imageSize </=
span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-a=
lign:baseline;background-color:transparent">=3D</span><span class=3D"" styl=
e=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-c=
olor:transparent"> height </span><span class=3D"" style=3D"margin:0px;paddi=
ng:0px;border:0px;vertical-align:baseline;background-color:transparent">*</=
span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-a=
lign:baseline;background-color:transparent"> width</span><span class=3D"" s=
tyle=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgroun=
d-color:transparent">;</span><span class=3D"" style=3D"margin:0px;padding:0=
px;border:0px;vertical-align:baseline;background-color:transparent">
                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
43,145,175)">int</span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent">[]</span><spa=
n class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:base=
line;background-color:transparent"> raster </span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent">=3D</span><span class=3D"" style=3D"margin:0px;padding:0px;bo=
rder:0px;vertical-align:baseline;background-color:transparent"> </span><spa=
n class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:base=
line;background-color:transparent;color:rgb(0,0,139)">new</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent"> </span><span class=3D"" style=3D"margin:0px;pa=
dding:0px;border:0px;vertical-align:baseline;background-color:transparent;c=
olor:rgb(43,145,175)">int</span><span class=3D"" style=3D"margin:0px;paddin=
g:0px;border:0px;vertical-align:baseline;background-color:transparent">[</s=
pan><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-al=
ign:baseline;background-color:transparent">imageSize</span><span class=3D""=
 style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgro=
und-color:transparent">];</span><span class=3D"" style=3D"margin:0px;paddin=
g:0px;border:0px;vertical-align:baseline;background-color:transparent">

                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(=
0,0,139)">if</span><span class=3D"" style=3D"margin:0px;padding:0px;border:=
0px;vertical-align:baseline;background-color:transparent"> </span><span cla=
ss=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;=
background-color:transparent">(!</span><span class=3D"" style=3D"margin:0px=
;padding:0px;border:0px;vertical-align:baseline;background-color:transparen=
t">image</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;=
vertical-align:baseline;background-color:transparent">.</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent;color:rgb(43,145,175)">ReadRGBAImage</span><span=
 class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:basel=
ine;background-color:transparent">(</span><span class=3D"" style=3D"margin:=
0px;padding:0px;border:0px;vertical-align:baseline;background-color:transpa=
rent">width</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0=
px;vertical-align:baseline;background-color:transparent">,</span><span clas=
s=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;b=
ackground-color:transparent"> height</span><span class=3D"" style=3D"margin=
:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transp=
arent">,</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;=
vertical-align:baseline;background-color:transparent"> raster</span><span c=
lass=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baselin=
e;background-color:transparent">,</span><span class=3D"" style=3D"margin:0p=
x;padding:0px;border:0px;vertical-align:baseline;background-color:transpare=
nt"> </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;ver=
tical-align:baseline;background-color:transparent;color:rgb(0,0,139)">true<=
/span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-=
align:baseline;background-color:transparent">))</span><span class=3D"" styl=
e=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-c=
olor:transparent">
                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent">{</span><=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:b=
aseline;background-color:transparent">
                        </span><span class=3D"" style=3D"margin:0px;padding=
:0px;border:0px;vertical-align:baseline;background-color:transparent;color:=
rgb(43,145,175)">MessageBox</span><span class=3D"" style=3D"margin:0px;padd=
ing:0px;border:0px;vertical-align:baseline;background-color:transparent">.<=
/span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-=
align:baseline;background-color:transparent;color:rgb(43,145,175)">Show</sp=
an><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-ali=
gn:baseline;background-color:transparent">(</span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent;color:rgb(128,0,0)">&quot;Page &quot;</span><span class=3D"" s=
tyle=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgroun=
d-color:transparent"> </span><span class=3D"" style=3D"margin:0px;padding:0=
px;border:0px;vertical-align:baseline;background-color:transparent">+</span=
><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align=
:baseline;background-color:transparent"> i </span><span class=3D"" style=3D=
"margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color=
:transparent">+</span><span class=3D"" style=3D"margin:0px;padding:0px;bord=
er:0px;vertical-align:baseline;background-color:transparent"> </span><span =
class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseli=
ne;background-color:transparent;color:rgb(128,0,0)">&quot; is corrupted&quo=
t;</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertic=
al-align:baseline;background-color:transparent">);</span><span class=3D"" s=
tyle=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgroun=
d-color:transparent">
                        </span><span class=3D"" style=3D"margin:0px;padding=
:0px;border:0px;vertical-align:baseline;background-color:transparent;color:=
rgb(0,0,139)">return</span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent">;</span><=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:b=
aseline;background-color:transparent">
                    </span><span class=3D"" style=3D"margin:0px;padding:0px=
;border:0px;vertical-align:baseline;background-color:transparent">}</span><=
span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:b=
aseline;background-color:transparent">
                </span><span class=3D"" style=3D"margin:0px;padding:0px;bor=
der:0px;vertical-align:baseline;background-color:transparent">}</span><span=
 class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:basel=
ine;background-color:transparent">
            </span><span class=3D"" style=3D"margin:0px;padding:0px;border:=
0px;vertical-align:baseline;background-color:transparent">}</span><span cla=
ss=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;=
background-color:transparent">
        </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;=
vertical-align:baseline;background-color:transparent">}</span><span class=
=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;ba=
ckground-color:transparent">
    </span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vert=
ical-align:baseline;background-color:transparent">}</span><span class=3D"" =
style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;backgrou=
nd-color:transparent">
</span><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;vertical=
-align:baseline;background-color:transparent">}</span></code></pre><pre cla=
ss=3D"" style=3D"margin-top:0px;margin-bottom:10px;padding:5px;border:0px;f=
ont-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);fon=
t-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mon=
o&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;C=
ourier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;c=
olor:rgb(0,0,0);line-height:18px">
<code style=3D"margin:0px;padding:0px;border:0px;vertical-align:baseline;fo=
nt-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mo=
no&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;=
Courier New&#39;,monospace,serif"><span class=3D"" style=3D"margin:0px;padd=
ing:0px;border:0px;vertical-align:baseline;background-color:transparent"><s=
pan style=3D"font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#=
39;,sans-serif;white-space:normal;background-color:rgb(255,255,255)">The pr=
oblem is that although some of the images are detected correctly as corrupt=
ed , others which are scanned correctly are detected as corrupted as well .=
 Those that are wrongly detected as corrupted , have a big resolution , but=
 i don&#39;t think that this has anything to do with it .</span><br>
</span></code></pre><pre class=3D"" style=3D"margin-top:0px;margin-bottom:1=
0px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;backgroun=
d-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Cons=
ole&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstrea=
m Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;w=
idth:auto;max-height:600px;color:rgb(0,0,0);line-height:18px">
Kind regards</pre><pre class=3D"" style=3D"margin-top:0px;margin-bottom:10p=
x;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-=
color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Consol=
e&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream =
Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;wid=
th:auto;max-height:600px;color:rgb(0,0,0);line-height:18px">
<br></pre><pre class=3D"" style=3D"margin-top:0px;margin-bottom:10px;paddin=
g:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rg=
b(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&=
#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera San=
s Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;=
max-height:600px;color:rgb(0,0,0);line-height:18px">
Chris</pre></div></div>

--001a11c34b9a75485304dec9739f--

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