Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-k.one.com (mx-k.one.com [91.198.169.58])
	by mail6.b-one.net (Postfix) with ESMTP id 82FEB80150C6A
	for <filtered@awaresystems.be>; Sat, 16 Jun 2012 19:20:42 +0200 (CEST)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-k: 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-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48])
	by mx-k.one.com (Postfix) with ESMTP id 04D6EF79B3F
	for <filtered@awaresystems.be>; Sat, 16 Jun 2012 17:20:41 +0000 (UTC)
Received: by pbbrq8 with SMTP id rq8so7229175pbb.21
        for <filtered@awaresystems.be>; Sat, 16 Jun 2012 10:20:41 -0700 (PDT)
Received: by 10.68.200.168 with SMTP id jt8mr15982815pbc.143.1339867241059;
        Sat, 16 Jun 2012 10:20:41 -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.143.92.14 with SMTP id u14csp256268wfl;
        Sat, 16 Jun 2012 10:20:39 -0700 (PDT)
Received: by 10.68.130.3 with SMTP id oa3mr12562858pbb.62.1339867239081;
        Sat, 16 Jun 2012 10:20:39 -0700 (PDT)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.250 as permitted sender) client-ip=91.198.169.250;
Received: by 10.131.136.9 with POP3 id o9mf2503426dan.34;
        Sat, 16 Jun 2012 10:20:38 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-s.one.com (mx-s.one.com [91.198.169.250])
	by mail6.b-one.net (Postfix) with ESMTP id 8111B80150C6A
	for <info@awaresystems.be>; Sat, 16 Jun 2012 19:03:24 +0200 (CEST)
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-s.one.com (Postfix) with ESMTP id 28340249F0DA
	for <info@awaresystems.be>; Sat, 16 Jun 2012 17:03:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 9135A1EDB4C;
	Sat, 16 Jun 2012 12:02:10 -0500 (EST)
Received: from sasl.smtp.pobox.com (a-pb-sasl-sd.pobox.com [74.115.168.62])
	by lists.maptools.org (Postfix) with ESMTP id 880991EDAD3
	for <tiff@lists.maptools.org>; Sat, 16 Jun 2012 12:00:39 -0500 (EST)
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1])
	by b-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 7F298B7B6
	for <tiff@lists.maptools.org>; Sat, 16 Jun 2012 13:00:38 -0400 (EDT)
Received: from b-pb-sasl-sd. (unknown [127.0.0.1])
	by b-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 77F33B7B5
	for <tiff@lists.maptools.org>; Sat, 16 Jun 2012 13:00:38 -0400 (EDT)
Received: from [192.168.1.24] (unknown [173.164.237.214]) (using TLSv1 with
	cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate
	requested)
	by b-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id ED9BEB7B4 for
	<tiff@lists.maptools.org>; Sat, 16 Jun 2012 13:00:37 -0400 (EDT)
Message-ID: <4FDCBBB4.8050600@pobox.com>
Date: Sat, 16 Jun 2012 10:00:36 -0700
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430
	Thunderbird/12.0.1
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <BLU0-SMTP193F1EA5CF393B76FF1631092FA0@phx.gbl>
In-Reply-To: <BLU0-SMTP193F1EA5CF393B76FF1631092FA0@phx.gbl>
X-Pobox-Relay-ID: CBF9C906-B7D4-11E1-A65A-FA6787E41631-06493634!b-pb-sasl-sd.pobox.com
Subject: Re: [Tiff] about the  TIFFSetField usage
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 12-06-16 09:37 AM, He Yang wrote:
> Hi
>      I am a beginner, an  try to learn how to use TIFFSetField usage,  I
> try to use  TIFFSetField as below
>
>        TIFFSetField(tif, tag, count, vlaue_ptr);
>     it works, but the value is not correct when I try to use TIFFGetField
> ,  the count = 1, and the vlaue_ptr is the pointer of a short value,
> which value equal to 16, but when I read it back it become 1.  What I
> did wrong?

He Yang,

The tricky thing with TIFFSetField() is that the calling sequence is very
much determined by which tag you are getting and setting.  The library
attempts to provide a "natural" calling sequence depending on the nature
of the tag but this means you need to lookup the particular tag in the
TIFFSetField man page to see the appropriate arguments.   Likewise with
TIFFGetField.  So you will need to be more specific about the tag you
are talking about.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://home.gdal.org/warmerda
and watch the world go round - Rush    | Geospatial Software Developer

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