Search code examples
c#wpfimagemagick.net-4.5

Trouble reading images with Magik.net.


I am using this example from Magik.net to read the info from DPX files.

http://magick.codeplex.com/wikipage?title=Read%20image&referringTitle=Documentation

The problem I am having is both:

LoadMemoryStreamImage

and

LoadImageBytes

do not reference anything, so throwing up

The name 'LoadMemoryStreamImage' does not exist in the current context

I cant seem to work out what they are supposed to be referencing?

It is a c# .Net4.5 project written with WPF.


Solution

  • You will have to implement those methods yourself. The LoadMemoryStreamImage method should return a MemoryStream that contains image data and the LoadImageBytes method should return a byte array that contains image data.

    You can find an implementation in the sample packages (https://github.com/dlemstra/Magick.NET/tree/main/samples/Magick.NET.Samples). The source code can also be found here: https://github.com/dlemstra/Magick.NET/blob/fbce52ed20e54062a51cd1de7f51cf36729883d0/samples/Magick.NET.Samples/ReadImage.cs

    p.s. It's Magick.NET not Magik.net :)