Rank: Advanced Member
Groups: Guest
Joined: 5/10/2017(UTC) Posts: 33
Thanks: 10 times Was thanked: 1 time(s) in 1 post(s)
|
Hello Aurigma team, first of all. I would have send you this via a support case, but the api does not allow to upload more than one image, so I report the issue here. Executing the following code, I get unexpected results. Used images are the attachments. Code:
public void FillPath()
{
using (var reader1 = ImageReader.Create(@"..\Pfad-1.tif"))
{
var clippingPath = reader1.ClippingPaths.First();
var path = Path.Create(clippingPath, 256, 256);
path.Close(); //Just for safety, does not work without this, too.
using (var maskGen = new ImageGenerator(new Size(256, 256), PixelFormat.Format32bppArgb, RgbColor.Transparent) { DpiX = 72, DpiY = 72 })
using (var drawer = new Drawer())
using (var writer = new TiffWriter(@"..\Result.tif"))
{
drawer.Draw += (sender, e) => { e.Graphics.FillPath(new SolidBrush(RgbColor.BlueViolet), path); };
(maskGen + drawer + writer).Run();
}
}
}
I would expect the BlueViolet area of the result ( Result.tif (257kb) downloaded 10 time(s).) to exactly match the blue area of the source ( Pfad-1.tif (28kb) downloaded 9 time(s).). Is this a bug or do I miss something? A while a go I submitted a similar case and I was told it would be fixed with the next update. Currently I am running version 9.1.28, x86. Regards Sebastian Edited by user Tuesday, August 29, 2017 11:14:43 PM(UTC)
| Reason: Attachments references restored
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Originally Posted by: SebastianR I would have send you this via a support case, but the api does not allow to upload more than one image, so I report the issue here. You can attach additional images after submitting a case. Originally Posted by: SebastianR 1359[/attach]) to exactly match the blue area of the source ( Pfad-1.tif (28kb) downloaded 9 time(s).). Is this a bug or do I miss something? Why do you expect the same color if you specify another one? You have the color [R=0, G=25, B=255, A=255] in the original image (Pfad-1.tif). The BlueViolet is [R=138, G=43, B=226, A=255]. So the following code produces the same color as in the original image: Code:drawer.Draw += (sender, e) => { e.Graphics.FillPath(new SolidBrush(new RgbColor(0, 25, 255)), path); };
|
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/10/2017(UTC) Posts: 33
Thanks: 10 times Was thanked: 1 time(s) in 1 post(s)
|
I expect the areas to match, not the color. If I use Photoshop CC to fill the area inside the path, the blue area is filled. In the source image, there are two yellow areas inside the blue one, but in the result from filling the path area with graphicsmill there is only one spot inside the blueviolet area. Please forgive me, if I was not precise enough.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 9/19/2006(UTC) Posts: 505
Was thanked: 41 time(s) in 41 post(s)
|
Try to use the FillingRule property: Code:using (var reader1 = ImageReader.Create("Pfad-1.tif"))
{
var clippingPath = reader1.ClippingPaths.First();
var path = Aurigma.GraphicsMill.AdvancedDrawing.Path.Create(clippingPath, 256, 256, true);
path.Close(); //Just for safety, does not work without this, too.
using (var maskGen = new ImageGenerator(new System.Drawing.Size(256, 256), PixelFormat.Format32bppArgb, RgbColor.Transparent) { DpiX = 72, DpiY = 72 })
using (var drawer = new Drawer())
using (var writer = new TiffWriter("Result.tif"))
{
drawer.Draw += (sender, e) =>
{
e.Graphics.FillingRule = FillingRule.EvenOdd;
e.Graphics.FillPath(new SolidBrush(RgbColor.BlueViolet), path);
};
(maskGen + drawer + writer).Run();
}
}
|
Best regards, Eugene Kosmin The Aurigma Development Team
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.