0
轉換/讀取2頁.tif文件時出現錯誤。什麼是正確的方法呢?將2頁.tif文件轉換爲.jpg
這裏的錯誤:
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);
}