I need to create a program that reads tif files from a directory and then trims 开发者_如何学JAVAthe bottom inch of the file and resaves the file. I know how to open the files but how would I automate this process from c#?
If you need to handle TIFF images in C# then have a look at LibTIFF.Net
http://bitmiracle.com/libtiff/ - It is open source and Native .NET component and free for commercial use.
This library should also have the TIFF cropping functions you need. I am not sure if the native .NET libraries can handle all of the TIFF functions you may require whereas LibTIFF will.
The original LibTIFF for C/C++ can be found at http://www.remotesensing.org/libtiff/ which may help you with documentation and support if needed.
Included with libTiff is a program called tiffCrop which should also have source code. http://www.remotesensing.org/libtiff/man/tiffcrop.1.html which can be accessed via http://www.remotesensing.org/libtiff/tools.html.
See here.
精彩评论