转换/读取 2 页 .tif 文件时出现错误。什么是正确的方法?
这是错误:
ImageMagick.MagickCoderErrorException: Magick: C:\DigitalAssets\sample.TIF: Null count for "Tag 33426" (type 4, writecount -3, passcount 1). `_TIFFVSetField' @ error/tiff.c/TIFFErrors/561
at ImageMagick.MagickImage.HandleReadException(MagickException exception)
at ImageMagick.MagickImage.Read(String fileName, MagickReadSettings readSettings)
at Digital_Asset_Converter_Service.Service.EPSFolderWatcher_Created(Object sender, FileSystemEventArgs e)
这是代码:
string fileName = @"C:\DigitalAssets\sample.tif";
using (MagickImageCollection image = new MagickImageCollection())
{
MagickReadSettings settings = new MagickReadSettings();
// settings.ColorSpace = ColorSpace.RGB;
settings.Density = new MagickGeometry(300, 300);
//settings.FrameIndex = 0;
// settings.FrameCount = 1;
image.Read(fileName,settings);
}