load pcx file and write to stream

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
nooBody

load pcx file and write to stream

Post by nooBody »

Hello everybody,
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();
Follow code doesnot do, what I want.

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 would like to have in "ms" memorystream loaded converted pcx file. (I would like to have in ms bmp file).


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();
Can you someone help me? I will be very happy :) Sorry for my simple english.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: load pcx file and write to stream

Post by magick »

We did not write nor do we support MagickNet. You'll need to contact the authors of MagickNet for help.
Post Reply