Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-i.one.com (mx-i.one.com [91.198.169.56])
	by mail9.b-one.net (Postfix) with ESMTP id B0A6040117C
	for <filtered@awaresystems.be>; Wed,  4 Jan 2012 14:08:07 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-i: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.160.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-pw0-f48.google.com (mail-pw0-f48.google.com [209.85.160.48])
	by mx-i.one.com (Postfix) with ESMTP id 30D0E115EA2B
	for <filtered@awaresystems.be>; Wed,  4 Jan 2012 13:08:06 +0000 (UTC)
Received: by pbaa12 with SMTP id a12so10424251pba.21
        for <filtered@awaresystems.be>; Wed, 04 Jan 2012 05:08:06 -0800 (PST)
Received: by 10.68.73.104 with SMTP id k8mr140546639pbv.104.1325682486179;
        Wed, 04 Jan 2012 05:08:06 -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.142.215.12 with SMTP id n12cs342883wfg;
        Wed, 4 Jan 2012 05:08:04 -0800 (PST)
Received: by 10.68.75.136 with SMTP id c8mr141856905pbw.113.1325682483665;
        Wed, 04 Jan 2012 05:08:03 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.57 as permitted sender) client-ip=91.198.169.57;
Received: by 10.131.47.8 with POP3 id z8mf13333982daj.33;
        Wed, 04 Jan 2012 05:08:03 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-j.one.com (mx-j.one.com [91.198.169.57])
	by mail9.b-one.net (Postfix) with ESMTP id EE46A40117C
	for <info@awaresystems.be>; Wed,  4 Jan 2012 13:56:04 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-j.one.com (Postfix) with ESMTP id 94D2CD88AF7
	for <info@awaresystems.be>; Wed,  4 Jan 2012 12:56:04 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 939821ED9F5;
	Wed,  4 Jan 2012 07:54:54 -0500 (EST)
Received: from moh1-ve2.go2.pl (moh1-ve2.go2.pl [193.17.41.132])
	by lists.maptools.org (Postfix) with ESMTP id 3DE9886A97
	for <tiff@lists.maptools.org>; Wed,  4 Jan 2012 07:36:18 -0500 (EST)
Received: from moh1-ve2.go2.pl (unknown [10.0.0.132])
	by moh1-ve2.go2.pl (Postfix) with ESMTP id 958121044020
	for <tiff@lists.maptools.org>; Wed,  4 Jan 2012 13:36:08 +0100 (CET)
Received: from unknown (unknown [10.0.0.142])
	by moh1-ve2.go2.pl (Postfix) with SMTP
	for <tiff@lists.maptools.org>; Wed,  4 Jan 2012 13:36:07 +0100 (CET)
Received: from unknown [213.222.200.45] by poczta.o2.pl with ESMTP id rhUGnI;
	Wed, 04 Jan 2012 13:36:07 +0100
Message-ID: <4F0447ED.70608@go2.pl>
Date: Wed, 04 Jan 2012 13:37:01 +0100
From: mikk <mikk@go2.pl>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <CAPKW8o0JcCJT4LRkVNDpnnEBjFaC23tASwwR6cCv6J_4S-xMaw@mail.gmail.com>
In-Reply-To: <CAPKW8o0JcCJT4LRkVNDpnnEBjFaC23tASwwR6cCv6J_4S-xMaw@mail.gmail.com>
X-O2-Trust: 1, 35
X-O2-SPF: neutral
Subject: Re: [Tiff] reading rgb values from 16 bits tif images
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

Hi,

When using TIFFReadRGBAImage - the raster pixels are 8-bit packed red, 
green, blue, alpha samples. It converts non-8-bit images by scaling 
sample values. Palette, grayscale, bilevel, CMYK and YCbCr images are 
converted to RGBtransparently. Raster pixels are returned uncorrected by 
any colorimetry information present in the directory.

So, you read a raster of pixels as 32-bit quads, 8-bits per component, 
and you use it correctly. The pixel values are of course in 0 - 2^8 
range. If you want to get unscaled 16-bit values you have to use 
different function (not the RGBA interface). Try with 
TIFFReadEncodedStrip/Tile.

Regards,
Michal Zaganczyk
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
