Hello,
Seems like the .Clip() method behaves very odd in some cases since the 901 release.
File to reproduce with: http://download.bkbone.nl/ClipProblem.tif
Narrowed it down to:
```
using (MagickImage img = new MagickImage(@"C:\Temp\ClipProblem.tif"))
{
img.ColorSpace = ColorSpace.sRGB;
img.ColorType = ColorType.TrueColorMatte;
img.BackgroundColor = new MagickColor(0.0F, 0.0F, 0.0F, 0.0F);
img.FillColor = new MagickColor(0.0F, 0.0F, 0.0F, 0.0F);
img.Clip("Pad A", false);
img.Negate(Channels.Alpha);
img.ColorAlpha(img.FillColor);
img.Format = MagickFormat.Png24;
img.Write(@"C:\Temp\ClipProblem.png");
}
```
Result with Magick.NET x86 6.8.7.502 (Q16):
http://download.bkbone.nl/ClipProblem6.8.7.502.png
(which is fine)
Result with Magick.NET x86 6.8.7.901 (Q16):
http://download.bkbone.nl/ClipProblem6.8.7.901.png
(which is unexpected)
(Please note the alpha channel / background transparency, which may not be visible directly in some browsers, as it just appears white).
Thanks for your time!
Kindest regards,
René
Comments: ** Comment from web user: backbonecompany **
Seems like the .Clip() method behaves very odd in some cases since the 901 release.
File to reproduce with: http://download.bkbone.nl/ClipProblem.tif
Narrowed it down to:
```
using (MagickImage img = new MagickImage(@"C:\Temp\ClipProblem.tif"))
{
img.ColorSpace = ColorSpace.sRGB;
img.ColorType = ColorType.TrueColorMatte;
img.BackgroundColor = new MagickColor(0.0F, 0.0F, 0.0F, 0.0F);
img.FillColor = new MagickColor(0.0F, 0.0F, 0.0F, 0.0F);
img.Clip("Pad A", false);
img.Negate(Channels.Alpha);
img.ColorAlpha(img.FillColor);
img.Format = MagickFormat.Png24;
img.Write(@"C:\Temp\ClipProblem.png");
}
```
Result with Magick.NET x86 6.8.7.502 (Q16):
http://download.bkbone.nl/ClipProblem6.8.7.502.png
(which is fine)
Result with Magick.NET x86 6.8.7.901 (Q16):
http://download.bkbone.nl/ClipProblem6.8.7.901.png
(which is unexpected)
(Please note the alpha channel / background transparency, which may not be visible directly in some browsers, as it just appears white).
Thanks for your time!
Kindest regards,
René
Comments: ** Comment from web user: backbonecompany **
The example is derived from a real world routine with tons of variables, so I didn't simplify it further by using short hand constants... :)
Thanks again and gelukkig nieuw jaar alvast! ;)