TIFF and LibTiff Mail List Archive


2004.03.09 17:58 "[Tiff] C# Wrapper", by Morten
2004.03.09 19:03 "Re: [Tiff] C# Wrapper", by Bob Friesenhahn

2004.03.09 19:03 "Re: [Tiff] C# Wrapper", by Bob Friesenhahn

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 Friesenhahn