2014-02-26 46 views
0

我有100多頁和單頁TIFFs與所有類型的壓縮,我想轉換他們到組4與libtiff.net,如果可能的話在TIFFCP在C#中。我嘗試通過Microsoft Visual Studio中的「添加引用」和using Bitmiracle.TiffCP;來完成此操作,但我不知道該如何使用此命名空間。如何將多頁面和單頁面tiff從所有壓縮類型轉換爲libtiff.net的組4壓縮?

我該如何解決?

+0

問候。如果你展示了你所嘗試過的東西,那將不勝感激。它可以幫助用戶回答問題並幫助找到解決問題的方法 –

+0

我通過Microsoft Visual Studio中的「添加參考」和「使用Bitmiracle.TiffCP」來做到這一點,但是我不知道如何使用TiffCP來做到這一點 – user3189265

回答

1

TiffCP是可執行文件與二進制文件打包在一起時,您download。請注意該目錄>>TiffCP.exe

這裏是一個implmentation我做了一個例子:

  System.Diagnostics.Process p = new System.Diagnostics.Process(); 
      p.StartInfo.UseShellExecute = false; 
      p.StartInfo.RedirectStandardOutput = true; 
      p.StartInfo.FileName = @"C:\PathToExe\TiffCP.exe"; 
      string path1 = @"C:\PathToImage\image.tiff"; 
      string path2 = @"C:\PathToImage\imagePage1.tiff"; 
      p.StartInfo.Arguments = "\"" + path1 + "\"" + ",0 \"" + path2 + "\""; 
      p.Start(); 
      string t = p.StandardOutput.ReadToEnd();