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#?

Ben
  • 213
  • 4
  • 13

2 Answers2

4

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
  • 2,321
  • 1
  • 17
  • 11
1

See here.

Community
  • 1
  • 1
Zafer
  • 2,180
  • 16
  • 28
  • 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 Sep 22 '10 at 15:36