Return-Path: <tiff-admin@remotesensing.org>
Received: from inav010.isp.belgacom.be (inav010.isp.belgacom.be [195.238.3.53])
        by six.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i29JE4r3007283
        for <joris.at.lebbeke@skynet.be>; Tue, 9 Mar 2004 20:14:07 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from inmx009.isp.belgacom.be (inmx009.isp.belgacom.be [195.238.3.146])
        by inav010.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-AV-2.02) with ESMTP id i29JCsWq032210
        for <joris.at.lebbeke@skynet.be>; Tue, 9 Mar 2004 20:12:55 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by inmx009.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i29JClsY022257
        for <joris.at.lebbeke@skynet.be>; Tue, 9 Mar 2004 20:12:49 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i29J4Hl31207;
	Tue, 9 Mar 2004 14:04:17 -0500
Received: from fuzzylog.simplesystems.org (fuzzylog.simplesystems.org [65.66.246.65])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i29J3Dl31176
	for <tiff@remotesensing.org>; Tue, 9 Mar 2004 14:03:13 -0500
Received: from scooby.simplesystems.org (scooby.simplesystems.org [65.66.246.67])
	by fuzzylog.simplesystems.org (8.9.3/8.9.3) with ESMTP id NAA13492;
	Tue, 9 Mar 2004 13:03:02 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@scooby.simplesystems.org
To: "maillist@iter.dk" <maillist@iter.dk>
cc: tiff@remotesensing.org
Subject: Re: [Tiff] C# Wrapper
In-Reply-To: <ABA7C596CDE84E9C0047CE2E000840AC.MAI@ns3.concor.dk>
Message-ID: <Pine.GSO.4.44.0403091256570.9129-100000@scooby.simplesystems.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Tue, 9 Mar 2004 13:03:02 -0600 (CST)
X-RAVMilter-Version: 8.4.3(snapshot 20030212) (inav010.isp.belgacom.be)
X-UIDL: c2cbbf0d8212b008ad722e441b46336f

On Tue, 9 Mar 2004, maillist@iter.dk wrote:

> Has anyone got a C# wrapper for the libtiff library?
>
> I have managed to wrap a few of the functions, but have problems with wrapping _TIFFmalloc, since I
> don't know how to handle the void* type that is returned.

The easiest way to create a C# wrapper is by implementing it in C++,
and expose the interfaces as a class by using "Managed C++".  The
void* type is a native type in C++.  For safety's sake, C# shouldn't
be exposed to C pointers.  In fact, the .NET run-time will not allow
managed code (i.e. C#) to access data allocated from the C/C++ heap.
It is not difficult to marshal raw image data into the GDI+ image
representation used by C#.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
