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 E2148300520662
	for <filtered@awaresystems.be>; Sun, 21 Dec 2014 15:43:13 +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.47 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47])
	by mx-b.one.com (Postfix) with ESMTP id A448777E25
	for <filtered@awaresystems.be>; Sun, 21 Dec 2014 15:43:13 +0000 (UTC)
Received: by mail-la0-f47.google.com with SMTP id hz20so2874011lab.20
        for <filtered@awaresystems.be>; Sun, 21 Dec 2014 07:43:13 -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
         :date:user-agent:references:in-reply-to:mime-version:message-id:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:content-type:content-transfer-encoding
         :sender:errors-to;
        bh=NVYq1ZocI1nfymTyOeVzTvcXtaQuiEiqG37Rs7yD4+8=;
        b=gRjOvuSt8PpBtjCH+bFZ1yO5HQKpzy1VxCXtLCsVbxcN7N8f4qzQJ0SfOjmfr2Wf95
         d03KAWZkAMQ0PofaQNs3gszMKjkfJWesR31weCUS58EBCShmaryclay0jVn4FYc7eIxm
         TbmJmCusu6j2YqyXz34nyTd8NYPeqSvkZoB97CvDYnsdKXwPS76zrSXfnJHXw4zkrhC3
         ZxsBgt4cWTQz6ZK+yZhYQOSIxQgriHcv8NY8aPZP0D+++J5FSakh9W6Eh7Mjr/479h3a
         9hsDgg9g7O4FbaJBbgfEVaSZ9t90xltKncnE7QAy3+ooAvu3n5INsSeYgTPWUIaN6ume
         MnGA==
X-Original-Authentication-Results: mx.google.com;       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
X-Received: by 10.152.206.108 with SMTP id ln12mr17688135lac.3.1419176593413;
        Sun, 21 Dec 2014 07:43:13 -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 dw19csp80750ldc;
        Sun, 21 Dec 2014 07:43:12 -0800 (PST)
X-Received: by 10.112.172.194 with SMTP id be2mr17991571lbc.53.1419176588928;
        Sun, 21 Dec 2014 07:43:08 -0800 (PST)
Authentication-Results: mx.google.com;
       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
Received-SPF: none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) client-ip=195.47.247.76;
Received: by 10.152.45.225 with POP3 id q1mf5239975lam.37;
        Sun, 21 Dec 2014 07:43:08 -0800 (PST)
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.one.com (Postfix) with ESMTP id 108C6300520662
	for <info@awaresystems.be>; Sun, 21 Dec 2014 15:43:04 +0000 (UTC)
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 DAF003CB074
	for <info@awaresystems.be>; Sun, 21 Dec 2014 15:43:03 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id E417335C039;
	Sun, 21 Dec 2014 10:41:54 -0500 (EST)
Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5])
	by lists.maptools.org (Postfix) with ESMTPS id 4CE6B35C02D
	for <tiff@lists.maptools.org>; Sun, 21 Dec 2014 10:37:28 -0500 (EST)
Received: from even-desktop.localnet (unknown [88.162.84.61])
	by smtp5-g21.free.fr (Postfix) with ESMTPS id E5EA6D48035;
	Sun, 21 Dec 2014 16:35:40 +0100 (CET)
From: Even Rouault <even.rouault@spatialys.com>
To: tiff@lists.maptools.org
Date: Sun, 21 Dec 2014 16:38:22 +0100
User-Agent: KMail/1.13.5 (Linux/2.6.32-67-generic; KDE/4.4.5; x86_64; ; )
References: <201412151849.41073.even.rouault@spatialys.com>
	<14803.1419128656@sss.pgh.pa.us>
	<alpine.GSO.2.01.1412210900330.18732@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.1412210900330.18732@freddy.simplesystems.org>
MIME-Version: 1.0
Message-Id: <201412211638.22955.even.rouault@spatialys.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [Tiff] Unnecessary bigger JPEG-compressed TIFF
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="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Le dimanche 21 d=E9cembre 2014 16:08:07, Bob Friesenhahn a =E9crit :
> On Sat, 20 Dec 2014, Tom Lane wrote:
> > Bob Friesenhahn <bfriesen@simple.dallas.tx.us> writes:
> >> On Sun, 21 Dec 2014, Even Rouault wrote:
> >>> And from my testing with old imagemagick it seems that gm convert
> >>> doesn't produce a YCbCr JPEG-compressed TIFF.
> >> =

> >> Hmmm ...
> >> Does YCbCr make that big of a difference?
> > =

> > Possibly.  What were you doing instead?  RGB output would be
> > substantially larger than YCbCr, possibly approaching 3x larger.  (That
> > still isn't enough to explain the reported size difference though.)
> =

> GraphicsMagick is setting the photometric to PHOTOMETRIC_RGB and
> setting the TIFF TIFFTAG_JPEGCOLORMODE tag to JPEGCOLORMODE_RGB.  I
> was hoping to avoid having to deal with YCbCr directly and that the
> RGB would be magically transformed to YCbCr (by libjpeg) but it seems
> that is not what is happening.  RGB is being stored instead.

You just need setting PHOTOMETRIC_YCBCR for that to happen automagically.

> =

> GraphicsMagick should of course be able to directly input/output YCbCr
> data in TIFF, but supporting the various sampling modes seem like a
> chore. To be honest, I have not researched it at all.

At least, if using the TIFFRead/WriteEncodedStrip/Tile interface, there's =

nothing particular to do. Upsampling/downsampling is handled by the JPEG =

codec.

> =

> Bob

-- =

Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
