Quantcast
Channel: magick Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1011

Commented Unassigned: circle Image is not drawing [1163]

$
0
0
Hello,

I was implemented below code to crop a circle image that was worked fine but now this code is not cropping the image and it's draw blank circle.


MagickReadSettings settings = new MagickReadSettings();
settings.Width = 200;
settings.Height = 200;
using (MagickImage image = new MagickImage("xc:none", settings))
{
using (MagickImage fill = new MagickImage(@"D:\pic\Images\pic1.png"))
{

fill.Resize(200, 200);
image.FloodFill(fill, 0, 0);
}
DrawableCircle dc = new DrawableCircle(200, 200, 200,1);
image.Draw(dc);
image.Write(@"D:\pic\\Images\circle_thumb.png");

}


We need any help to resolve this issues ASPS
Comments: ** Comment from web user: dlemstra **

It looks like you where using the side effect of a bug that has been fixed. FloodFill used to change the FillPatern property of MagickImage but that has been fixed. You should change your code to this:
```C#
MagickReadSettings settings = new MagickReadSettings();
settings.Width = 200;
settings.Height = 200;
using (MagickImage image = new MagickImage("xc:none", settings))
{
using (MagickImage fill = new MagickImage(@"D:\pic\Images\pic1.png"))
{
fill.Resize(200, 200);
image.FillPattern = fill;
DrawableCircle dc = new DrawableCircle(200, 200, 200, 1);
image.Draw(dc);
image.Write(@"D:\pic\Images\circle_thumb.png");
}
}
```


Viewing all articles
Browse latest Browse all 1011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>