Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx4.public.one.com ([10.246.18.24])
	by mail6.local.one.com (Dovecot) with LMTP id gORRMQ/BIll/zwEAsyOMew
	for <filtered@awaresystems.be>; Mon, 22 May 2017 11:54:50 +0000
X-HalOne-ID: 7509d79f-3ee5-11e7-81cb-b82a72d0454d
Received: from mail-oi0-f41.google.com (unknown [209.85.218.41])
	by mx4.public.one.com (Halon) with ESMTPS
	id 7509d79f-3ee5-11e7-81cb-b82a72d0454d;
	Mon, 22 May 2017 11:54:49 +0000 (UTC)
Received: by mail-oi0-f41.google.com with SMTP id h4so157651452oib.3
        for <filtered@awaresystems.be>; Mon, 22 May 2017 04:54:49 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :mime-version:in-reply-to:references:from:date:message-id:to:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:mime-version:sender:errors-to;
        bh=hklLshY+2781vspmCMaerXs1BTREE6XPQ8oJ3lEb4+A=;
        b=RR3l97zFT4alq+GdR+Bd87XUxpbIkDLyeQ6wIS5FoLdpg/zRN04Sg9MKHcCeBz96/h
         Apic3CdrYd44qKXoQ6uPoLeiFl4lAgTiBHTtVdA/OV+nXKGkOmDbW1z9pBlxUsSC06WD
         pAXQkSGxfv+6f14u7EKHMPjGRdAu67zbVOkN1+gMz+W7irzJjpVFhn9OH9Pq7xmTjZ5M
         6JLywVjwxkSHlj6P2E/d4/PnXHO2o987Ic0W+yAHkTJjvIxG5XthRF5orPw5lQkVi2us
         haxkXBiBziV85zgY7xxP2F5iqgPut6D68JTl0g9NJ/t74qEVtbksU6A6WCSMAA9nMkTX
         virQ==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AODbwcA57aRLQ0fs4itqmxh6+l7Veph3+5HbgKcM9BvzVs58meDOXO8b
	F6IoY8q0eaEw1SycKAHI0FIFNpQxiv2F2iEwChfwGA==
X-Received: by 10.157.44.243 with SMTP id e48mr13075526otd.138.1495454088379;
        Mon, 22 May 2017 04:54:48 -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.202.104.144 with SMTP id o16csp1200083oik;
        Mon, 22 May 2017 04:54:47 -0700 (PDT)
X-Received: by 10.223.169.79 with SMTP id u73mr2718802wrc.33.1495454087205;
        Mon, 22 May 2017 04:54:47 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1495454087; cv=none;
        d=google.com; s=arc-20160816;
        b=D8qdwtTzf+buAr3kpBrRfQrLSQzBf8q6hICCcXWZSdL+qQlNgLykThDRSjpF/x4Q5P
         p/KYkzfDVwEyTHTNh0YhjY5Zp8zStVVwCTNVZIAve2L1G3aWt5tN42+xF75wLwuIG3JI
         +EEeCcYorcueXdQYQBfT0GFAwAYmCRYe/NgvmJyqegVLfNkEwXFGVtQZ3VJx15Jvvkzt
         wsG6+P+i1NpdiwnyyhA2b/4U52odWziq1SyPQA8QcdVd5AgO3S4HP1eT6BpUGTgwb625
         v2mKEZYzDJGouEB5xkghelsH+Il/65lIW19WwCDCXzs3izqJXvTCEJqej0PoznMyyzYI
         TOQA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:mime-version:list-subscribe:list-help:list-post
         :list-archive:list-unsubscribe:list-id:precedence:subject:cc:to
         :message-id:date:from:references:in-reply-to:mime-version
         :arc-authentication-results;
        bh=hklLshY+2781vspmCMaerXs1BTREE6XPQ8oJ3lEb4+A=;
        b=hmGJNRVMIshOJZNRLuFxJSYhzNX6cwpktCE/JACsHBHzy7RQmBI7uOYqaw2f252LzQ
         3r40DifNLbFWlMziD7DXCJ4Yp18CeDvlybs6ed/tFhjfbD04eFcQpeyF301CmoVefw88
         IYJDEkxPF83vQAx7J97b7V6cvr42TVmI43wWFD9jWEVX+Nz0MsvVq7I67aDhfsvdEZx5
         fLPrjAUBQepPpim+4E8aQoIXssbPXiR6QDgz0Bg26SFOFP4mJGQurcagJvl8N4JKdtBM
         Z0Lb8pTIJbJGeZhvH7kgSABvxnAdUtjpkoiYoJKJCH2UHeG1L4IEnGzEif1ls1DZHcFi
         xuxg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id g29si19265546wmc.70.2017.05.22.04.54.46;
        Mon, 22 May 2017 04:54:47 -0700 (PDT)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 112E535C026;
	Mon, 22 May 2017 06:53:43 -0500 (EST)
Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com
	[209.85.213.50])
	by lists.maptools.org (Postfix) with ESMTPS id 8744835C023
	for <tiff@lists.maptools.org>; Mon, 22 May 2017 06:53:25 -0500 (EST)
Received: by mail-vk0-f50.google.com with SMTP id y190so39195239vkc.1
	for <tiff@lists.maptools.org>; Mon, 22 May 2017 04:53:25 -0700 (PDT)
X-Received: by 10.31.15.136 with SMTP id 130mr6512436vkp.58.1495454004250;
	Mon, 22 May 2017 04:53:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.88.65 with HTTP; Mon, 22 May 2017 04:53:03 -0700 (PDT)
In-Reply-To: <CAGNS0RsF9czO=Rv5EXQzJe0KNGE_UFyvbRLRMAS3GXknwNU+PA@mail.gmail.com>
References: <CAO=tXLAn0GAbQV-UsxNrJ9dd7P_fxKmm_B78Qz9ZwBFP3Ks8Hg@mail.gmail.com>
	<D53A2232.473CE%kemp@objectivepathology.com>
	<CAO=tXLAy42a1fhr=5fKxe6pWBxP8f-6_cpbjt-n7aNG3cqObow@mail.gmail.com>
	<CAGNS0RtUVAz2Ki5QMXB4UF86ELXuejVGSeRTdx7JaQEP3-pUTQ@mail.gmail.com>
	<CAO=tXLBpZO+JenD-z4kdq13y99=Vf72U8_3eS3NoqN+qqKdhyQ@mail.gmail.com>
	<CAGNS0RsF9czO=Rv5EXQzJe0KNGE_UFyvbRLRMAS3GXknwNU+PA@mail.gmail.com>
From: Yakov Galka <ybungalobill@gmail.com>
Date: Mon, 22 May 2017 14:53:03 +0300
Message-ID: <CAO=tXLCbnDOs--aBzYdGkJhS-sjx7tZtfKSE6uP6o6eJqLFHLA@mail.gmail.com>
To: John Cupitt <jcupitt@gmail.com>
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] JPEG compressed RGB tiled TIFF with chroma subsampling
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="===============1340168398=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============1340168398==
Content-Type: multipart/alternative; boundary="001a11437154b38e2f05501b84fe"

--001a11437154b38e2f05501b84fe
Content-Type: text/plain; charset="UTF-8"

On Thu, May 11, 2017 at 11:48 PM, <jcupitt@gmail.com> wrote:

> I don't think I've come across a reader which doesn't handle this
> case. Almost all jpeg-in-tiff files use this mode, so you really have
> to.
>

I take my words back. The only viewers that worked were mspaint and the
windows photo viewer. IIPImage seems to have tried to support it but has a
bug and fails. OpenCV imread fails. Pretty much every code that does not
expect to handle this case *specifically* fails. Which I expect to be the
majority of TIFF reading code in the wild.


> It's arguably a basic misdesign with tiff: writers are simple (you can
> describe almost any pixel layout with a tiff header), but readers are
> hard (you have to be able to read almost any pixel layout),
>

I expect libTIFF to abstract those differences. It is not the only thing
that libTIFF chooses to shift the responsibility onto the user of the
library even though it could just as cheaply hide those pesky details.
Another example would be the tile/strip discrepancy.

-- 
Yakov Galka
http://stannum.co.il/

--001a11437154b38e2f05501b84fe
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Thu, May 11, 2017 at 11:48 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:=
jcupitt@gmail.com" target=3D"_blank">jcupitt@gmail.com</a>&gt;</span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo=
rder-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=3D"gmail=
-">
</span>I don&#39;t think I&#39;ve come across a reader which doesn&#39;t ha=
ndle this<br>
case. Almost all jpeg-in-tiff files use this mode, so you really have<br>
to.<br></blockquote><div><br></div><div>I take my words back. The only view=
ers that worked were mspaint and the windows photo viewer. IIPImage seems t=
o have tried to support it but has a bug and fails. OpenCV imread fails. Pr=
etty much every code that does not expect to handle this case *specifically=
* fails. Which I expect to be the majority of TIFF reading code in the wild=
.<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x">

It&#39;s arguably a basic misdesign with tiff: writers are simple (you can<=
br>
describe almost any pixel layout with a tiff header), but readers are<br>
hard (you have to be able to read almost any pixel layout),<br></blockquote=
><div><br></div><div>I expect libTIFF to abstract those differences. It is =
not the only thing that libTIFF chooses to shift the responsibility onto th=
e user of the library even though it could just as cheaply hide those pesky=
 details. Another example would be the tile/strip discrepancy.<br></div></d=
iv><br>-- <br><div class=3D"gmail_signature"><div dir=3D"ltr"><div>Yakov Ga=
lka<br><a href=3D"http://stannum.co.il/" target=3D"_blank">http://stannum.c=
o.il/</a></div></div></div>
</div></div>

--001a11437154b38e2f05501b84fe--

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