Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx10.public.one.com ([10.246.18.30])
	by mail6.local.one.com (Dovecot) with LMTP id zUEFKVboIllaGQEAsyOMew
	for <filtered@awaresystems.be>; Mon, 22 May 2017 13:45:45 +0000
X-HalOne-ID: f356bfdb-3ef4-11e7-aad7-246e9615723c
Received: from mail-oi0-f53.google.com (unknown [209.85.218.53])
	by mx10.public.one.com (Halon) with ESMTPS
	id f356bfdb-3ef4-11e7-aad7-246e9615723c;
	Mon, 22 May 2017 13:45:44 +0000 (UTC)
Received: by mail-oi0-f53.google.com with SMTP id b204so161647946oii.1
        for <filtered@awaresystems.be>; Mon, 22 May 2017 06:45:44 -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
         :date:from:to:in-reply-to:message-id:references:user-agent
         :mime-version:cc:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe
         :content-transfer-encoding:sender:errors-to;
        bh=u0MhhqduBUyCtpO9yLfUFRTagHNwhEJp0CV/neLzLB8=;
        b=tc3HNjTiToshs/ByCgj/JleDXr6j7+tzlS28B4ZY6yGQBosXqGOIBiPoE56eYwIX8N
         n3JJ5nXeKKE41gneCzs6peVBxjVShGo75WpnCBF7rpSVMz/CZi19H5HW29SawCHnHTXy
         TcaqBtToVFS16yDOO+Y5S2VSIn6Ux8L+FPPqAELV9HMcYzEE+vvnAwLeSOtKG5lzrQFa
         3Dmy3HD7rXeaJ/UaLUQ3wTXhBdVIB+lbOnYIf7Iz4ull2XgBlj9kjYTSo0821uOOkulp
         WUSqELkslg/8F1xmX793WmsFOdOz72YL8JXvw+JmfldEqb4oSJLs5tH3oYlz+ac0DVOs
         9E0Q==
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
X-Gm-Message-State: AODbwcD5huQ2WIRUpSLerq3FzwnKEV8TdJv9i38SomdHw7w37c4kRQ0L
	tMrCzBr0qIvetwVRpevZeIZLNJv6FQqSUZaTeKr5Lg==
X-Received: by 10.157.27.208 with SMTP id v16mr11010675otv.103.1495460743024;
        Mon, 22 May 2017 06:45:43 -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 o16csp1245472oik;
        Mon, 22 May 2017 06:45:41 -0700 (PDT)
X-Received: by 10.28.68.195 with SMTP id r186mr288235wma.22.1495460741909;
        Mon, 22 May 2017 06:45:41 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1495460741; cv=none;
        d=google.com; s=arc-20160816;
        b=Yagpg4p3lrbffYzmk0hKIvQbdhEw2iM3/wZKLZsDPMGihxdgq93vGk+2yifW60xzQ5
         793aqrlBTnqq6mAERewYeJBWG8o4vY8cFQIq4gQlENaYfijyoiBk+IIG+PnmaQvnkLah
         Vn7Px2yhnh0ZXVGEhAWBwcVwv0v5/1mTNHsH+IlYffSjQK/Rdg+0VgJD8M4rTo/Qs+7z
         QsKpwDiJK+D3Tz3oiVfXyF83MwdMp16SGiMuNOiNZ1ErMy4XJ5m9sppOw+uBIS+P3kiE
         whrn77YSqMb1TMaEtN8DlQ3dXEiwdnG8CtJG8fbIHCf/aU+GwOgkD/mndc2FBP3FjNRU
         kscw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help
         :list-post:list-archive:list-unsubscribe:list-id:precedence:subject
         :cc:mime-version:user-agent:references:message-id:in-reply-to:to
         :from:date:arc-authentication-results;
        bh=u0MhhqduBUyCtpO9yLfUFRTagHNwhEJp0CV/neLzLB8=;
        b=tVDk5RMeTHz64hRiJehfGfI+oUnnlHPpgZcGo8ClC+Bxi79XJizLUwpJfc7pax4EMx
         n6jrkwbpOb4udXKqUn+8UZCQbscSb5FtY2qzn4O+jXwrag9F7hnJN2Fe7WJeWHHAeBrV
         E7NbydXYsmMCrZnHr21ADZhXN2b3qvrqerihlvjzd92hn/qX44ftz1kMW9KiIHKQOclg
         prIGm0mGP93AwTl9ZWSdynLKoNKFDfmyT6kSKf0kZlB1PWzBpXDYtpNwN455ZAQu/i/u
         MCNS/rvnbzmd8S4yZKgxm2YlF5KQFMqMQaNQV6e6Xw7ntLBleC65VUgiEVNFBhrr4X5S
         nHLQ==
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
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 u3si18604522wmf.54.2017.05.22.06.45.40;
        Mon, 22 May 2017 06:45:41 -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
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 5370535C04F;
	Mon, 22 May 2017 08:44:51 -0500 (EST)
Received: from smtp.simplesystems.org (smtp.simplesystems.org [65.66.246.90])
	by lists.maptools.org (Postfix) with ESMTPS id E504635C04D
	for <tiff@lists.maptools.org>; Mon, 22 May 2017 08:39:49 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by smtp.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	v4MDdlkQ002612; Mon, 22 May 2017 08:39:47 -0500 (CDT)
Date: Mon, 22 May 2017 08:39:47 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Yakov Galka <ybungalobill@gmail.com>
In-Reply-To: <CAO=tXLCbnDOs--aBzYdGkJhS-sjx7tZtfKSE6uP6o6eJqLFHLA@mail.gmail.com>
Message-ID: <alpine.GSO.2.20.1705220832550.6623@freddy.simplesystems.org>
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>
	<CAO=tXLCbnDOs--aBzYdGkJhS-sjx7tZtfKSE6uP6o6eJqLFHLA@mail.gmail.com>
User-Agent: Alpine 2.20 (GSO 67 2015-01-07)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(smtp.simplesystems.org [65.66.246.90]);
	Mon, 22 May 2017 08:39:47 -0500 (CDT)
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: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Mon, 22 May 2017, Yakov Galka wrote:

> 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.

There are many broken/incomplete TIFF readers "in the wild", 
particularly when one goes beyond "baseline" TIFF.  JPEG compression 
is particularly an issue since its original specification was broken 
and Adobe's DRAFT TIFF Technical Note #2 
(http://www.simplesystems.org/libtiff/TIFFTechNote2.html) should be 
followed instead.

> 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.

Libtiff does provide dummy/abstraction interfaces, but they do result 
in increased resource consumption, loss of performance, and sometimes 
loss of original image quality, compared with use of lower-level 
interfaces which deliver more directly into the using application's 
preferred internal storage format.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
