Draw Rectangle unfilled C#
Draw Rectangle unfilled C#
Sorry, here again
How to draw a rectangle unfilled on a image? Using wrapper
Regards
How to draw a rectangle unfilled on a image? Using wrapper
Regards
Re: Draw Rectangle unfilled C#
I cannot help you with a complete example I can only use my phone at the moment. You should use the drawable classes and the Draw method of MagickImage. I hope this can help you for now. I will be behind a pc next week and then I can help you with a better example if you still need it.
Re: Draw Rectangle unfilled C#
I appreciate the attention, I expect to find before solution. Because otherwise I'll be here wondering upps jeje
I found the guide (http://imagemagick.org/Usage/draw/#primitives) but I still do not understand how to use it in the Wrapper.
Regards
Thanks
I found the guide (http://imagemagick.org/Usage/draw/#primitives) but I still do not understand how to use it in the Wrapper.
Regards
Thanks
Re: Draw Rectangle unfilled C#
Hello
Can you help me with this issue that I could not solve?.
Use C# with Magick.NET-x86.dll
Regards
Thank You
Can you help me with this issue that I could not solve?.
Use C# with Magick.NET-x86.dll
Regards
Thank You
Re: Draw Rectangle unfilled C#
I completely forgot about this topic.
When you draw a circle it has two color. The stroke color (the line) and the fill color (part inside line). You can make it 'empty' if you set the fill color to transparent. Below is an example:
When you draw a circle it has two color. The stroke color (the line) and the fill color (part inside line). You can make it 'empty' if you set the fill color to transparent. Below is an example:
Code: Select all
using (MagickImage image = new MagickImage(new MagickColor("yellow"), 500, 500))
{
DrawableStrokeColor strokeColor = new DrawableStrokeColor(new MagickColor("purple"));
DrawableStrokeWidth stokeWidth = new DrawableStrokeWidth(5);
DrawableFillColor fillColor = new DrawableFillColor(MagickColor.Transparent);
DrawableCircle circle = new DrawableCircle(250, 250, 100, 100);
image.Draw(strokeColor, stokeWidth, fillColor, circle);
image.Write(@"C:\circl.png");
}
Re: Draw Rectangle unfilled C#
Thank you very much for your prompt response. I works great.
I have just a curiosity, not a mistake, but when the lines of a rectangle is generated, the lines are not uniform, on some occasions the line is not seen. (part of the line)
Regards
thx
I have just a curiosity, not a mistake, but when the lines of a rectangle is generated, the lines are not uniform, on some occasions the line is not seen. (part of the line)
Regards
thx
Re: Draw Rectangle unfilled C#
Can you post an example? I don't understand the question/issue. Are you using the latest version of Magick.NET?
Re: Draw Rectangle unfilled C#
Hi
To generate the image using the same method you gave me. Use Magick.NET-7.0.0.0007-Q16-x86-net20
How do I send a picture?
Regards
Thk
To generate the image using the same method you gave me. Use Magick.NET-7.0.0.0007-Q16-x86-net20
How do I send a picture?
Regards
Thk
Re: Draw Rectangle unfilled C#
You can post your image on something like dropbox and post a link here.
Re: Draw Rectangle unfilled C#
In the image on upper right corner, line becomes thinner. It is not a mistake, but why is not uniform?
What I observed is that this occurs with high resolution images.
https://www.dropbox.com/s/io6x7esk11aib ... o.jpg?dl=0
Thk
Regards
What I observed is that this occurs with high resolution images.
https://www.dropbox.com/s/io6x7esk11aib ... o.jpg?dl=0
Thk
Regards
Re: Draw Rectangle unfilled C#
Are you adding the rectangle before or after you resize the image?
Re: Draw Rectangle unfilled C#
Hi,
I make no resize before or after. Only apply the rectangle. I can't now load the original image, later I upload the image.
Regards
I make no resize before or after. Only apply the rectangle. I can't now load the original image, later I upload the image.
Code: Select all
MagickImage image = new MagickImage(strPathImage);
DrawableStrokeColor strokeColor = new DrawableStrokeColor(new MagickColor("white"));
DrawableStrokeWidth stokeWidth = new DrawableStrokeWidth(7);
DrawableFillColor fillColor = new DrawableFillColor(MagickColor.Transparent);
DrawableRectangle rec = new DrawableRectangle(new Rectangle(300, 300, image.Width - 600, image.Height - 600));
image.Draw(strokeColor, stokeWidth, fillColor, rec);
image.Write(strOutImagen);
Re: Draw Rectangle unfilled C#
We were able to reproduce the issue and the next release of Magick.NET will include a fix for this. Thank you for all the great information that helped us find the bug.
Re: Draw Rectangle unfilled C#
Excellent, it was a pleasure. Thank to you guys.