How to read Multipage-TIFFs? (MagickMissingDelegateErrorException)
Posted: 2018-08-09T09:49:33-07:00
Hi!
I hope someone can help me! I try to read Multipage-TIFFs but I get this error:
My code:
With this code I am able to read the first page, but I need all of them:
I hope someone can help me! I try to read Multipage-TIFFs but I get this error:
Code: Select all
ImageMagick.MagickMissingDelegateErrorException: no decode delegate for this image format `' @ error/blob.c/CustomStreamToImage/770
bei ImageMagick.MagickImageCollection.NativeMagickImageCollection.ReadStream(MagickSettings settings, ReadWriteStreamDelegate reader, SeekStreamDelegate seeker, TellStreamDelegate teller)
bei ImageMagick.MagickImageCollection.AddImages(Stream stream, MagickReadSettings readSettings, Boolean ping)
bei ImageMagick.MagickImageCollection.AddRange(Stream stream)
bei ***.cs:Zeile 184.
Code: Select all
// Try To Read Multipage-TIFF
using (MagickImageCollection tiffImageCollection = new MagickImageCollection())
{
tiffImageCollection.AddRange(att.ContentStream);
foreach (var img in tiffImageCollection)
{
// Add binarized Image to Collection
img.Depth = 1;
img.Settings.Compression = Compression.Fax;
collection.Add(img);
}
[...]
}
Code: Select all
var img = new MagickImage(att.ContentStream);
img.Depth = 1;
img.Settings.Compression = Compression.Fax;
collection.Add(img);