A)
You should set the colorspace and density before your read the file to get the correct result. You are also doing that on the command line. You can do this with the MagickReadSettings class. Below is an example.
B) and C)
Magick.NET does not use the console version of ImageMagick it calls the methods that will be called by convert.exe directly. The methods that are used by convert.exe are compiled into the Magick.NET library. Most methods and properties have the same name as their command line equivalent to make it easier to change a command line command into C# code.
You should set the colorspace and density before your read the file to get the correct result. You are also doing that on the command line. You can do this with the MagickReadSettings class. Below is an example.
MagickReadSettings settings = new MagickReadSettings(); settings.ColorSpace = ColorSpace.RGB; settings.Density = new MagickGeometry(72, 72); using (MagickImage image = new MagickImage("93eaeccc-fcd8-4ef1-bb46-08279a5c881a.eps", settings)) { image.Format = MagickFormat.Png; byte[] bytes = image.ToByteArray(); // No need to write to a stream first.using (FileStream fs = File.OpenWrite("93eaeccc-fcd8-4ef1-bb46-08279a5c881a.png")) { fs.Write(bytes, 0, bytes.Length); } }
Magick.NET does not use the console version of ImageMagick it calls the methods that will be called by convert.exe directly. The methods that are used by convert.exe are compiled into the Magick.NET library. Most methods and properties have the same name as their command line equivalent to make it easier to change a command line command into C# code.