Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
375 views
in Technique[技术] by (71.8m points)

.net - Using LibTiff from C# (to access tiled TIFF images)

I'd like to use LibTiff to access very large TIFF files. I need functions like multiple pages and tiles, and so LibTiff seems to be the right way to go. Can anyone help me on how to use LibTiff from C#? I've found some links (like blog.bee-ee which contained partial code. But I couln't get beyond getting a version. I've looked at FreeImage but found it not suitable (pictures are approx. 800 MPixel 8 or 16 bit grayscale --> 800-1600 MByte) size and I can't load it in memory in a 32-bit environment)

I'm very experienced in C/C++, but not yet in C#. Can anyone help me to a wrapper or some hints?

Note: I need pages to access pyramidical planes (multi-resolution) in a tiff, and tiles of 256x256 to have fast access to different parts of the image without loading it at once.

[Edit] The LibTIFF.NET solution seemed most practical for me. I'm now integrating it in a product development, and it will propably save me a lot of headaches from going in/out of managed memory. I have not yet tried the 'callback' functionality, which seems to be solved nicely in a .net way. Thanks for the help on stackoverflow [/Edit]

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can try our LibTiff.Net. It is free and open source version of LibTiff written using managed C#. API of our implementation kept very similar to original one's.

https://bitmiracle.com/libtiff/

We've just released it, so there may be bugs. But full source code comes with a number of test, so most obvious bugs should be fixed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...