问题
After downloading ImageMagick-6.9.8-Q16 from the official site of ImageMagick, i receive this error when i try to convert a file .tiff to .pdf using this command:
convert -resample 200X200 dir.tif dir.pdf
error
and when i try to run using .NET program, this command can't create a file.pdf
        ProcessStartInfo pinfo = new ProcessStartInfo();
        pinfo.UseShellExecute = false;
        pinfo.RedirectStandardOutput = true;
        pinfo.CreateNoWindow = true;
        pinfo.FileName = converterPath;
        pinfo.Arguments = "convert -resample 200X200" + dirTif+ dirPdf;
        Process proc = null;
        try
        {
            proc = Process.Start(pinfo);
            proc.WaitForExit(); 
        }
        catch (Exception ex)
        {
         serviceLogger.WriteMessage("PROCESS EXCEPTION", ex.Message + " | " + ex.StackTrace + " | " +ex.Source );
        }
How can I fix it?
回答1:
You can ignore them like this:
convert image.tif -define tiff:ignore-tags=TAG1,TAG2,TAG3 ...
If you want to check what you are ignoring first, look here to search for TIFF tags.
来源:https://stackoverflow.com/questions/44820300/issue-imagemagick-6-9-8-q16-on-win-server-2012r2-net