tags:

views:

44

answers:

2

I need to create a program that reads tif files from a directory and then trims the 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#?

+1  A: 

See here.

Zafer
tiff is a kind of image, but not all tiff flavors will work on all platforms. Some will, many won't. See stackoverflow [libtiff][c#] topics on this.
Adriaan
+2  A: 

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.

Andrew Cash