Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas026.isp.belgacom.be (localhost [127.0.0.1])
        by inav001.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id kA6MKRtt016242
        for <joris.at.lebbeke@skynet.be>; Mon, 6 Nov 2006 23:20:27 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx007.isp.belgacom.be (inmx007.isp.belgacom.be [195.238.5.89])
        by inas026.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id kA6MKING010822
        for <joris.at.lebbeke@skynet.be>; Mon, 6 Nov 2006 23:20:21 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx007.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id kA6MKCfY017433
        for <joris.at.lebbeke@skynet.be>; Mon, 6 Nov 2006 23:20:12 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id kA6M20T1008700;
	Mon, 6 Nov 2006 17:03:53 -0500
Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id kA6M1xcX008695
	for <tiff@lists.maptools.org>; Mon, 6 Nov 2006 17:01:59 -0500
Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215])
	by fmmailgate03.web.de (Postfix) with ESMTP id F18C633E88F7
	for <tiff@lists.maptools.org>; Mon,  6 Nov 2006 23:01:56 +0100 (CET)
Received: from [194.66.67.127] (helo=[10.1.16.114])
	by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256)
	(WEB.DE 4.107 #114) id 1GhCXU-0006pX-00
	for tiff@lists.maptools.org; Mon, 06 Nov 2006 23:01:56 +0100
Message-ID: <454FB0D3.7090509@web.de>
Date: Mon, 06 Nov 2006 22:01:55 +0000
From: Olumide <50295@web.de>
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
To: tiff@lists.maptools.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Sender: 50295@web.de
Subject: [Tiff] Strange RGB values [Newbie Question]
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
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
X-UIDL: 000000000023ceae.00001d2b
X-MSP-STORE: Mon, 06 Nov 2006 23:20:37 +0100
Status:   

Hello

I have a white, uncompressed TIFF image (no color), which I'm trying to 
read. For some reason, I'm getting mostly 205 color values for each channel.

Code snippet:

uint32 *buffer;
int imgWidth, imgHeight, imgSize;

TIFFGetField(tiff, TIFFTAG_IMAGEWIDTH, &imgWidth);
TIFFGetField(tiff, TIFFTAG_IMAGELENGTH, &imgHeight);
imgSize = imgWidth * imgHeight + 1;

buffer = (uint32 *) malloc( sizeof(uint32 *) * imgSize;
TIFFReadRGBAStrip(tiff, 0, buffer);

for( i = 0; i < imgWidth; i++)
{
	for( j = 0; j < imgHeight; j++)
	{
		printf("%d ", TIFFGetR( buffer[j*imgWidth + i]) );
	}
	printf("\n");
}


Output:
... 255 255 *205 205 205 205 205 205 205 205 ... *
... 255 255 *205 205 205 205 205 205 205 205 ... *

Where does the 205 come from? Thanks,

- Olumide
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
