Hi,
I am using magicNet.dll in my project. In my project I need to crop one image more than one times. I write the code, but first time its gives correct result, but after that when I am trying to crop that 1st cropped image its gives wrong result. I am just stuck into that. My coding is like below,
magicnet.magic.image img; ...................... in the top.
form_load-
img=new magicnet.magic.image(filename);
void crop()
{
MagickNet.Magick.Init();
img = new MagickNet.Image(img);
//img1 = img;
img.Crop(rec);
picViewer.Image=MagickNet.Image.ToBitmap(img);
MagickNet.Magick.Term();
}
here rectangle value i am getting from mouse move. Please help me.
problem regarding magicnet.dll
Re: problem regarding magicnet.dll
After the first crop you have a virtual canvas. Reset the virtual canvas. From the command line its +repage or -page 0x0+0+0. We didn't write MagickNet. Do they have a page operation?
Re: problem regarding magicnet.dll
thanks for reply. Yes they have page operation I have tested with the below code,
imgQc.Page.Width=0;
imgQc.Page.Height=0;
imgQc.Page.XOff=0;
imgQc.Page.YOff=0;
but the result coming same.
imgQc.Page.Width=0;
imgQc.Page.Height=0;
imgQc.Page.XOff=0;
imgQc.Page.YOff=0;
but the result coming same.
Re: problem regarding magicnet.dll
Hi,
After each cropping, do this:
image.Page = new Geometry(0,0,0,0)
It assigns zeros to those Page properties
plus it does some mysterious work that is required here.
(Do not know exactly what. Haven`t seen the source code)
It helped in my case.
Greetings,
Leszy
After each cropping, do this:
image.Page = new Geometry(0,0,0,0)
It assigns zeros to those Page properties
plus it does some mysterious work that is required here.
(Do not know exactly what. Haven`t seen the source code)
It helped in my case.
Greetings,
Leszy