Return-Path: <tiff-admin@remotesensing.org>
Received: from inmx010.isp.belgacom.be (inmx010.isp.belgacom.be [195.238.2.73])
        by mailst006.isp.belgacom.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i4SM51Gf031046
        for <joris.at.lebbeke@skynet.be>; Sat, 29 May 2004 00:05:01 +0200
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.44])
        by inmx010.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i4SM4sJS031130
        for <joris.at.lebbeke@skynet.be>; Sat, 29 May 2004 00:04:55 +0200
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.6) with ESMTP id i4SM3Lx02098;
	Fri, 28 May 2004 18:03:21 -0400
Received: from sabre.velocet.net (postfix@sabre.velocet.net [216.138.209.205])
	by yoda.imagelinks.com (8.11.6/8.11.6) with ESMTP id i4SM2Ix02046
	for <tiff@remotesensing.org>; Fri, 28 May 2004 18:02:18 -0400
Received: from pobox.com (H156.C195.tor.velocet.net [216.138.195.156])
	by sabre.velocet.net (Postfix) with ESMTP
	id 5F39D13934B; Fri, 28 May 2004 18:02:16 -0400 (EDT)
Message-ID: <40B7B6F0.30708@pobox.com>
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: James Carroll <jim@microbrightfield.com>
Cc: tiff@remotesensing.org
Subject: Re: [Tiff] trouble Reading the tiles I wrote
References: <5EA4B2EDD4BA8B4C84BE11298F81ADC403777C@exchange.microbrightfield.com>
In-Reply-To: <5EA4B2EDD4BA8B4C84BE11298F81ADC403777C@exchange.microbrightfield.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.13
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Fri, 28 May 2004 18:02:24 -0400
X-UIDL: 21abfbd7991667e3b08df04f2b472ec3

James Carroll wrote:
> Hi,  I'm working with large images, and just created a conversion
> program to create some tiled jpeg compressed tiffs.  I can create the
> files, and the tiffs seem to be valid enough to be read by viewers like
> irfanview.
> 
> Now I'm reading the same files into my own viewer, and having some
> trouble with the color model.  There doesn't seem to be a ReadTileRGBA
> and I'm having trouble converting to my internal RGBRGBRGB... image.
> 
> What should look like:
> http://neuroinformatica.com:8080/jims/smallGood.jpg
> What it does look like:
> http://neuroinformatica.com:8080/jims/smallBad.jpg
> 
> What's the best way to convert to RGBRGBRGB...  (or BGRBGRBGR...) for
> all types of encodings of tiled tiffs?

Jim,

There is a TIFFReadRGBATile() function if you don't mind repacking from
RGBA format to your preferred order.  The alternative of doing your own
(possible) color conversion may be somewhat challenging depending on the
nature of your source image.

PS. it would be helpful to include a tiffinfo report of your source file
if you want people to comment on things that might be challenging in reading
it.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
