I have to code some project in C# and I have to work with pcx files. I would like to try your ImageMagick project. But when I use it, I have some problems. I explane all my problems.
At the begenning I use VS2010 beta1.
I referenced in my project MagickNet.dll in version 1.0.0.3 from this http://midimick.com/magicknet/magickDoc.html
So I show part of my code:
Following code works file, but I cannot save image to disk, then load new image, then work with image, and then remove from disk
Code: Select all
MagickNet.Magick.Init();
MagickNet.Image img = new MagickNet.Image(path); // load pcx - OK
img.Write("conversation.bmp"); //
MagickNet.Magick.Term();
Code: Select all
MemoryStream ms = new MemoryStream(); // stream for image data
MagickNet.Magick.Init();
MagickNet.Image img = new MagickNet.Image(path);
img.Write(ms, "bmp"); //in ms is loaded pcx file, but I want to have converted to bmp file.
MagickNet.Magick.Term();
I tried this too, but similar problem.
Code: Select all
MagickNet.Magick.Init();
MagickNet.Image img = new MagickNet.Image(path); // load pcx - OK
System.Drawing.Image image = MagickNet.Image.ToBitmap(img); // in img is loaded pcx file -> I cannot convert to bitmap -> exception
MagickNet.Magick.Term();