Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-b.one.com (mx-b.one.com [91.198.169.49])
	by mail6.local.one.com (Postfix) with ESMTP id 3F24930018A52C
	for <filtered@awaresystems.be>; Mon, 22 Dec 2014 15:00:15 +0000 (UTC)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-b: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.215.43 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43])
	by mx-b.one.com (Postfix) with ESMTP id EDB39871B16
	for <filtered@awaresystems.be>; Mon, 22 Dec 2014 15:00:14 +0000 (UTC)
Received: by mail-la0-f43.google.com with SMTP id s18so4090673lam.2
        for <filtered@awaresystems.be>; Mon, 22 Dec 2014 07:00:14 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:delivered-to:delivered-to:from:to
         :cc:subject:in-reply-to:references:comments:date:message-id;
        bh=R/Xx5iEM3EcOuvXQADuVfnYeNKxWAezEHgsE7nifMo8=;
        b=IaTbfRpVb6RMdlmFVi5iZps0Zsc/1b8ahxWkOXIZMAd6ObupsfAkpea5X9BcTyOSNv
         zWlCbxlihr0wco8PXIlmv3lFvK76idQVSVp93XFcgfPLboYJWIZgp1s53MzuOYIfpaID
         laCxXjbVCXtA7vEH4XkQecez+qmxr6jAB4DJIQ81CkUKF9ccsjDBAEuxPe75tYuLLQ45
         tmBihxmV2rLpNKjfmdjhBPlfeVknV9bOGP20LGysrrDMKpoYJl6ijRUiBkGBHGlFpJuM
         3+Cb5CLnKIzNvvYTeGIl/aM5+FwHqOxW0eZm9QFO4e9aRQQ54E9ZT2tvRZv6xXEJ90NN
         5Vkw==
X-Original-Authentication-Results: mx.google.com;       spf=fail (google.com: domain of tgl@sss.pgh.pa.us does not designate 91.198.169.250 as permitted sender) smtp.mail=tgl@sss.pgh.pa.us
X-Received: by 10.112.101.100 with SMTP id ff4mr22254971lbb.94.1419260414601;
        Mon, 22 Dec 2014 07:00:14 -0800 (PST)
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.181.147 with SMTP id dw19csp310852ldc;
        Mon, 22 Dec 2014 07:00:13 -0800 (PST)
X-Received: by 10.112.156.169 with SMTP id wf9mr22346380lbb.85.1419260412583;
        Mon, 22 Dec 2014 07:00:12 -0800 (PST)
Authentication-Results: mx.google.com;
       spf=fail (google.com: domain of tgl@sss.pgh.pa.us does not designate 91.198.169.250 as permitted sender) smtp.mail=tgl@sss.pgh.pa.us
Received-SPF: fail (google.com: domain of tgl@sss.pgh.pa.us does not designate 91.198.169.250 as permitted sender) client-ip=91.198.169.250;
Received: by 10.152.105.137 with POP3 id gm9mf6186059lab.29;
        Mon, 22 Dec 2014 07:00:11 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-s.one.com (mx-s.one.com [91.198.169.250])
	by mail6.local.one.com (Postfix) with ESMTP id 320DD30018A52C
	for <info@awaresystems.be>; Mon, 22 Dec 2014 14:59:59 +0000 (UTC)
Received-SPF: pass (mx-s: domain of tgl@sss.pgh.pa.us designates 66.207.139.130 as permitted sender)
X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130])
	by mx-s.one.com (Postfix) with ESMTP id CA4AB559233
	for <info@awaresystems.be>; Mon, 22 Dec 2014 14:59:58 +0000 (UTC)
Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1])
	by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sBMExtKd018678;
	Mon, 22 Dec 2014 09:59:56 -0500
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Joris Van Damme (AWare Systems)" <info@awaresystems.be>
cc: TIFF <tiff@lists.maptools.org>
Subject: Re: [Tiff] PNG in TIFF ?
In-reply-to: <CA+NZCsSpP4903k2NYY7JVj76F9KdwTvAdRtJ19WU70YE-i02DQ@mail.gmail.com>
References: <5497299F.6070300@gmx.de> <54972B7E.8060209@telegraphics.com.au> <CA+NZCsQvXdVHyfm7W4RXTt4kGesWg+5xejhebHsL486Frz0xDw@mail.gmail.com> <21485.1419213278@sss.pgh.pa.us> <CA+NZCsSpP4903k2NYY7JVj76F9KdwTvAdRtJ19WU70YE-i02DQ@mail.gmail.com>
Comments: In-reply-to "Joris Van Damme (AWare Systems)" <info@awaresystems.be>
	message dated "Mon, 22 Dec 2014 09:51:51 +0100"
Date: Mon, 22 Dec 2014 09:59:55 -0500
Message-ID: <18677.1419260395@sss.pgh.pa.us>

"Joris Van Damme (AWare Systems)" <info@awaresystems.be> writes:
> Tom,
>> That's not really PNG's compression method though.  PNG does use deflate
>> but there is a pixel-differencing filter in front of that; for lots of
>> image types the filtering step is critical to the amount of compression
>> you can get.

> I tend to always use flate compression with the Predictor tag, in
> TIFF. I found that does indeed make a lot of difference (no pun
> intended).

> I take it what you're saying is that the differencing filters in PNG
> are more advanced, and that there's more of them to (automatically or
> semi-automatically) choose from? I always thought the law of
> diminishing returns would likely apply, but I've never actually
> attempted to really measure. Would it be safe to say that the simple
> Predictor scheme in TIFF goes a long way, you think, or do I
> overestimate its capability when it comes to the bottom line
> compressed file size?

Setting Predictor would certainly be a lot better than nothing,
but I doubt it would match PNG.  IIRC, the only allowed predictor
in TIFF is previous-pixel (horizontal differencing); PNG has about
five options and allows per-scan-line choice of which to use.

Another thing to keep in mind is that Predictor is described as an
optional extension in the TIFF spec.  I don't know what compatibility
hazards you face if you use it.  (Of course, that caveat can be applied
to depressingly many things in TIFF ...)

			regards, tom lane
