Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: NoDecodeDelegateForThisImageFormat exception

$
0
0
Hello
there is a pretty simple code:
public static void ReadImageFromEmptyBitmap()
{
    using (MagickImage image = new MagickImage(new Bitmap(400, 600, PixelFormat.Format24bppRgb)))
    {
    }

    using (MagickImage image = new MagickImage(new Bitmap(400, 400, PixelFormat.Format24bppRgb)))
    {
    }
}
it works, but if I made simple change at the first line it throws exception:
public static void ReadImageFromEmptyBitmap()
{
    // changed height to 400, exception in the next line
    using (MagickImage image = new MagickImage(new Bitmap(400, 400, PixelFormat.Format24bppRgb)))
    {
    }

    using (MagickImage image = new MagickImage(new Bitmap(400, 400, PixelFormat.Format24bppRgb)))
    {
    }
}
Exception:
ImageMagick.MagickMissingDelegateErrorException was unhandled
  HResult=-2146233088
  Message=Magick.Net.Example.vshost.exe: NoDecodeDelegateForThisImageFormat `XWD' @ error/blob.c/BlobToImage/352
  Source=Magick.NET.Wrapper-x86
  StackTrace:
       at ImageMagick.Wrapper.MagickImage.HandleException(MagickException exception)
       at ImageMagick.Wrapper.MagickImage.Read(Stream stream, MagickReadSettings readSettings)
       at ImageMagick.MagickImage.Read(Stream stream, MagickReadSettings readSettings)
       at ImageMagick.MagickImage.Read(Stream stream)
       at ImageMagick.MagickImage.Read(Bitmap bitmap)
       at ImageMagick.MagickImage..ctor(Bitmap bitmap)
...
  InnerException: 
Is it a bug in ImageMagick?

Viewing all articles
Browse latest Browse all 3693

Trending Articles