Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-j.b-one.net (mx-j.one.com [91.198.169.57])
	by mail9.b-one.net (Postfix) with ESMTP id A462E40045C
	for <info@awaresystems.be>; Fri,  8 Jan 2010 01:16:47 +0100 (CET)
Received: by mx-j.b-one.net (Postfix, from userid 106)
	id 9CBA26A0F164; Fri,  8 Jan 2010 01:16:47 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=6 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-j.b-one.net (Postfix) with ESMTP id CF9686A0F16B for
 <info@awaresystems.be>; Fri,  8 Jan 2010 01:16:46 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 2F7591D18DE7A; Thu,  7 Jan 2010
 19:16:14 -0500 (EST)
Received: from edge.aegean.gr (edge.aegean.gr [195.251.128.7]) by
 lists.maptools.org (Postfix) with ESMTPS id 07AD81D18DE70 for
 <tiff@lists.maptools.org>; Thu,  7 Jan 2010 19:14:07 -0500 (EST)
Received: from hermes.aegean.gr (195.251.128.2) by edge.aegean.gr
 (195.251.128.7) with Microsoft SMTP Server (TLS) id 8.2.213.0; Fri, 8 Jan
 2010 02:14:06 +0200
Received: from hermes.aegean.gr ([195.251.128.2]) by hermes.aegean.gr
 ([195.251.128.2]) with mapi; Fri, 8 Jan 2010 02:14:05 +0200
From: Kavallieratou Ergina <kavallieratou@aegean.gr>
To: "tiff@lists.maptools.org" <tiff@lists.maptools.org>
Date: Fri, 8 Jan 2010 02:13:10 +0200
Thread-Topic: can please anybody help?
Thread-Index: AQHKj/d9ohdQmzbeH0eRpJyspgcdTg==
Message-ID: <87230A7E62A21E4F9EBD941DF2A48F03E2C32AC2C4@hermes.aegean.gr>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
MIME-Version: 1.0
Subject: [Tiff] can please anybody help?
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

 I repeat more correctly here.
Can anybody please comment on my code?
Gin

struct gen
{
unsigned char ** data;
unsigned short int width;
unsigned short int height;
unsigned short int bits_per_pixel;
};

stuct gen imagen;

TIFF *out= TIFFOpen("ar.tif", "w");

TIFFSetField (out, TIFFTAG_IMAGEWIDTH, imagen->width);
TIFFSetField(out, TIFFTAG_IMAGELENGTH, imagen->height);
TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 1);
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
BYTE *bits;
for (int y = 0; y < imagen->height; y++)
{
bits= imagen->data[y];
if (TIFFWriteScanline(out,bits, y, 0)==-1) cout<<"Complete or error";
}
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
