Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx6.public.one.com ([10.246.18.26])
	by mail6.local.one.com (Dovecot) with LMTP id wFJvHUb+Olm2gQAAsyOMew
	for <filtered@awaresystems.be>; Fri, 09 Jun 2017 20:23:51 +0000
X-HalOne-ID: 8c4625cc-4d51-11e7-a839-b82a72d854f0
Received: from mail-ot0-f176.google.com (unknown [74.125.82.176])
	by mx6.public.one.com (Halon) with ESMTPS
	id 8c4625cc-4d51-11e7-a839-b82a72d854f0;
	Fri, 09 Jun 2017 20:23:50 +0000 (UTC)
Received: by mail-ot0-f176.google.com with SMTP id a2so44233513oth.2
        for <filtered@awaresystems.be>; Fri, 09 Jun 2017 13:23:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :date:from:to:in-reply-to:message-id:references:user-agent
         :mime-version:cc:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe
         :content-transfer-encoding:sender:errors-to;
        bh=zBgUgx5ldp/Pf6TE1W4ZMMnB/Ak7A0UZZOQiOpWFus0=;
        b=FS5UdajmaFyZiQwCeuD7EPp+xK6EnrkN4frOiB0h15sPg7tLKGxZmZcvP7bUGc0+4I
         MZW/G0ChdMBciA6mlm+1SobkbvB7St27QrfcZ7+6wrvANXWjEmibqzTKHRXUjBsCNjqt
         iYZxBZU1PXsw24AjEnu0BqncwHJ8oXZo6WzlFU0KgApOfpoWfLMFSmTE5b8Ee1qJMImr
         GmEa9IIMTm+6BdcZs0tQiEHvWLnmZwUHmTqzqhlvLWnH1g7SeTQPJ+2lU+IFpC8vkDDZ
         PbYwFNxohhJu4rN4WpGEsClle1mJvtM+kjxKUyVPI9nQoPrdNuYh+no6D144506pIQrq
         83uQ==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
X-Gm-Message-State: AODbwcC19Q7nOISJBx/G4BtrCykMTBrtyjQsivvH++BAlmux6kKCeJjP
	L45eEQhPS0cgfGndwG6MwW0WtpWGNh7QO0+aoAMeiQ==
X-Received: by 10.157.73.149 with SMTP id g21mr6023831otf.62.1497039829544;
        Fri, 09 Jun 2017 13:23:49 -0700 (PDT)
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.202.104.37 with SMTP id d37csp2945948oic;
        Fri, 9 Jun 2017 13:23:48 -0700 (PDT)
X-Received: by 10.223.169.120 with SMTP id u111mr255855wrc.203.1497039828263;
        Fri, 09 Jun 2017 13:23:48 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1497039828; cv=none;
        d=google.com; s=arc-20160816;
        b=rMM09Gcgjeg5+N4tC58pL9MkGf9n3HtC0zuLYU47ZU0omSNjiMP1KEkUNv8mLIthXA
         Ab4wM0EC0iOVxV/mTdympRtT5JqHM1OLhII4FW4euU3wTWWXzpc7OCap6pDhlqoowvRw
         6/2xFZA/597KU3l3r5A9pyTNIiOdmV7i1SQcyNFpucUxmN6gK+Jou81NYeXIUYB/stNm
         st08NaB97dqsebjqzp8a6FpCCiWb1G3xnzgvoLZ1WyoGNuSgAvx1QA0SioCWcKOYjyHy
         m/xVUamBTmDmeadN6fXVscRKh2E2nFlglXJbn50pj+d2A3euiKzi0IzUJlWvZ6D+drJ3
         4dsQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help
         :list-post:list-archive:list-unsubscribe:list-id:precedence:subject
         :cc:mime-version:user-agent:references:message-id:in-reply-to:to
         :from:date:arc-authentication-results;
        bh=zBgUgx5ldp/Pf6TE1W4ZMMnB/Ak7A0UZZOQiOpWFus0=;
        b=sa+HA+5bPue39Nz1EOt3YHhpoVoykgXdQbTwkI9IQXkuGbR9i5KoL4XeKidTjsHegA
         h44tiWCbGxfYZRaxvvHjRsNCasjzE3YfMaIwZJQeqx3yJ6z2PfJgJwQGQPeAp/BGmZHD
         a0lPa2lP8tMCLuXXMlSZHeSxT3wQKP8VU0st5m4spIFqpVBDhM5i0Xpyc2pF8wgnN8gY
         sJYA+n57HohHzoNlKe1fkroFlDTHpjCRkQWIAHppjoi8NvBf54lAPA6ubuYdbZakKdEb
         8TOQlTo6GC1VlGpPwq6hIQWsnibtMaXCdVaosuZn0qS5dbQXzQySyyRA8cJBbHx6itDF
         PJiw==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id g78si608816wmi.125.2017.06.09.13.23.41;
        Fri, 09 Jun 2017 13:23:48 -0700 (PDT)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 853C735C05C;
	Fri,  9 Jun 2017 15:22:40 -0500 (EST)
Received: from smtp.simplesystems.org (smtp.simplesystems.org [65.66.246.90])
	by lists.maptools.org (Postfix) with ESMTPS id 98BD135C059
	for <tiff@lists.maptools.org>; Fri,  9 Jun 2017 15:18:48 -0500 (EST)
Received: from scrappy.simplesystems.org (scrappy.simplesystems.org
	[65.66.246.73])
	by smtp.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	v59KIjZt015602; Fri, 9 Jun 2017 15:18:46 -0500 (CDT)
Date: Fri, 9 Jun 2017 15:18:45 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@scrappy.simplesystems.org
To: fbrubeck <felipe.brubeck@gmail.com>
In-Reply-To: <1497038243141-14115.post@n3.nabble.com>
Message-ID: <alpine.GSO.2.20.1706091513390.1596@scrappy.simplesystems.org>
References: <CANSuHaF2U+aWQxJgfv4N8o+scHhKvEx1KviMWMAe+7eRO8+v9A@mail.gmail.com>
	<alpine.GSO.2.20.1706091351300.1596@scrappy.simplesystems.org>
	<1497038243141-14115.post@n3.nabble.com>
User-Agent: Alpine 2.20 (GSO 67 2015-01-07)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(smtp.simplesystems.org [65.66.246.90]);
	Fri, 09 Jun 2017 15:18:46 -0500 (CDT)
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Read and interpret 16 bit strip data with geo 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="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Fri, 9 Jun 2017, fbrubeck wrote:

> Hi Bob,
>
> I appreciate your help. I tried your approach, but when I print it, it shows
> "19" for the four values of p16[x].
> For what I have read, this data might be an address, an index or the pixel
> value, but still I don't know how to make sense of it.
> I will appreciate if somebody can help me with this.
> If it helps, it's SPOT 6 data.

Try using

    printf("%u\n", p16[0] );
    printf("%u\n", p16[1] );
    printf("%u\n", p16[2] );

instead.  This would print the original stored values.

If the image is quite dark, then the values may be small.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
