MagickMissingDelegateErrorException: no decode delegate for this image format

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Harald
Posts: 13
Joined: 2018-07-26T05:59:40-07:00
Authentication code: 1152

MagickMissingDelegateErrorException: no decode delegate for this image format

Post by Harald »

Hello,

I am working with Magick.NET-Q16-AnyCPU Version 7.9.0.2.

I have a MVC application in C#. Download a TIF file via byte array.

Use this memory stream gives the following error:
---> ImageMagick.MagickMissingDelegateErrorException: no decode delegate for this image format `' @ error/blob.c/CustomStreamToImage/769
ImageMagick.MagickImageCollection.NativeMagickImageCollection.ReadStream(MagickSettings settings, ReadWriteStreamDelegate reader, SeekStreamDelegate seeker, TellStreamDelegate teller)

Saving the TIF as file on the disc and load this file is working.

Two things I have tried, but without success:
1. content.Seek(0, SeekOrigin.Begin);
2. var readSettings = new MagickReadSettings() { Format = MagickFormat.Tif };
var image = new MagickImage(Stream, readSettings);

Any ideas? Thank you in advance.

Harald
Harald
Posts: 13
Joined: 2018-07-26T05:59:40-07:00
Authentication code: 1152

Re: MagickMissingDelegateErrorException: no decode delegate for this image format

Post by Harald »

Found the solution. The problem was this line in my code:
MagickImageCollection layers = new MagickImageCollection(stream)

I used same stream for the MagickImage and MagickImageCollection.
Now I use a copy of the stream for MagickImageCollection and it works!
Post Reply