Hi All,
I am using the MagickNet DLL in a web application. I need to
fill an area in my GIF image with a specific color and I used
the flood fill method. Now the area is always filled with
BLACK color.
Below is my sample code used:
protected void Page_Load(object sender, EventArgs e)
{
MagickNet.ImageList iml=new ImageList();
MagickNet.Image im = new MagickNet.Image
(Server.MapPath("images/sdf.jpg"));
MagickNet.Color c = new Color
(System.Drawing.Color.Transparent);
im.FloodFill(100, 100,
System.Drawing.Color.Transparent);
iml.Images.Add(im);
iml.Write(Server.MapPath("images/sdf1.jpg"));
}
Can anyone please help me in this regard ?
Thanks in Advance.
With Regards,
M. Gangadhar.
Problem in Floodfill method
Re: Problem in Floodfill method
Hi All,
I have found a solution for the below mentioned issue.
I have set the Opacity to zero and then used the Flood fill method and it worked fine.
MagickNet.Color c = new Color (System.Drawing.Color.Transparent);
im.opacity = 0;
im.FloodFill(100, 100, c);
With Regards,
M. Gangadhar.
I have found a solution for the below mentioned issue.
I have set the Opacity to zero and then used the Flood fill method and it worked fine.
MagickNet.Color c = new Color (System.Drawing.Color.Transparent);
im.opacity = 0;
im.FloodFill(100, 100, c);
With Regards,
M. Gangadhar.