Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-q.one.com (mx-q.one.com [91.198.169.248])
	by mail6.local (Postfix) with ESMTP id 26D8480150C9C
	for <filtered@awaresystems.be>; Wed, 19 Dec 2012 16:00:48 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-q: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.220.171 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171])
	by mx-q.one.com (Postfix) with ESMTP id B02717DB08D
	for <filtered@awaresystems.be>; Wed, 19 Dec 2012 15:00:47 +0000 (UTC)
Received: by mail-vc0-f171.google.com with SMTP id n11so2420898vch.30
        for <filtered@awaresystems.be>; Wed, 19 Dec 2012 07:00:46 -0800 (PST)
X-Received: by 10.59.6.70 with SMTP id cs6mr9271079ved.60.1355929246518;
        Wed, 19 Dec 2012 07:00:46 -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.58.144.166 with SMTP id sn6csp21345veb;
        Wed, 19 Dec 2012 07:00:45 -0800 (PST)
X-Received: by 10.220.247.204 with SMTP id md12mr9311863vcb.27.1355929245015;
        Wed, 19 Dec 2012 07:00:45 -0800 (PST)
Received-SPF: neutral (google.com: 195.47.247.72 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=195.47.247.72;
Received: by 10.220.9.210 with POP3 id m18mf1614323vcm.26;
        Wed, 19 Dec 2012 07:00:44 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx01.one.com (mx01.one.com [195.47.247.72])
	by mail6.local (Postfix) with ESMTP id D538D80150C9C
	for <info@awaresystems.be>; Wed, 19 Dec 2012 16:00:22 +0100 (CET)
X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx01.one.com (Postfix) with ESMTP id 8C135EC6D05
	for <info@awaresystems.be>; Wed, 19 Dec 2012 15:00:22 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 57B6135C039;
	Wed, 19 Dec 2012 09:59:00 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id E249735C039
	for <tiff@lists.maptools.org>; Wed, 19 Dec 2012 09:58:04 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	qBJEw0E3013195; Wed, 19 Dec 2012 08:58:00 -0600 (CST)
Date: Wed, 19 Dec 2012 08:58:00 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: swagat mishra <swagatmishra2007@gmail.com>
In-Reply-To: <CA+y9FkpQ+ZmRgHXjHVebLB+gN-m_2+iNZpRupgrRbs+MmszmzA@mail.gmail.com>
Message-ID: <alpine.GSO.2.01.1212190849110.19664@freddy.simplesystems.org>
References: <CA+y9FkoH9woUYaqadt6Kx3NgDjF++DxA_14UxR7Kv3EsSmZ-4Q@mail.gmail.com>
	<CA+y9FkpQ+ZmRgHXjHVebLB+gN-m_2+iNZpRupgrRbs+MmszmzA@mail.gmail.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED;
	BOUNDARY="-559023410-924543083-1355929080=:19664"
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Wed, 19 Dec 2012 08:58:00 -0600 (CST)
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] decoding tiff images with ycbcr and jpeg compression
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-924543083-1355929080=:19664
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT

On Tue, 18 Dec 2012, swagat mishra wrote:

>       hi,
> I am trying to decode the quad-jpeg.tif image with the TiffReadRgbaImage interface. My libtiff version
> is 4.0.2 and it is compiled with support for jpeg,lzw,libz and other compression schemes.
> TiffReadRgbaImage returns true but i get a completely black image,instead of the actual image.
> I went through previous posts on the mailing list and it seems this is  a bug in 4.x.x . Suggested fix
> was to set tiff tag JPEGCOLORMODE to RGB. However that did not work.
> Can anyone help me with this?

I see that you have now posted your email three times already.  Your 
email does get through.  It is just that no one has responded.

Using GraphicsMagick and libtiff 4.0.3 I am able to load quad-jpeg.tif 
without any problems.  While TIFFReadRGBAImage() may be simple to use, 
it does not support all TIFF subformats.

For this file, GraphicsMagick uses TIFFReadEncodedStrip().  It does 
use this hack to cause libjpeg to do the conversion from ycbcr to RGB:

   TIFFSetField( tiff, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );

After applying this hack, the subsequent code should behave as if the 
image uses PHOTOMETRIC_RGB rather than PHOTOMETRIC_YCBCR.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
---559023410-924543083-1355929080=:19664
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/
---559023410-924543083-1355929080=:19664--
