public const string RecentGdiplusIsAvailable = nameof(Helpers) + "." + nameof(GetRecentGdiPlusIsAvailable);
public const string RecentGdiplusIsAvailable2 = nameof(Helpers) + "." + nameof(GetRecentGdiPlusIsAvailable2);
public const string GdiPlusIsAvailableNotRedhat73 = nameof(Helpers) + "." + nameof(GetGdiPlusIsAvailableNotRedhat73);
+ public const string GdiPlusIsAvailableNotWindows7 = nameof(Helpers) + "." + nameof(GetGdiPlusIsAvailableNotWindows7);
public const string AnyInstalledPrinters = nameof(Helpers) + "." + nameof(IsAnyInstalledPrinters);
public static bool GetGdiplusIsAvailable()
return GetGdiplusIsAvailable();
}
+ public static bool GetGdiPlusIsAvailableNotWindows7()
+ {
+ if (PlatformDetection.IsWindows7)
+ {
+ return false;
+ }
+
+ return GetGdiplusIsAvailable();
+ }
+
public static bool GetRecentGdiPlusIsAvailable()
{
// CentOS 7, RHEL 7 and Ubuntu 14.04 are running outdated versions of libgdiplus
}
}
- [ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
+ [ConditionalFact(Helpers.GdiPlusIsAvailableNotWindows7)]
public void Bitmap8bbpIndexedGreyscalePixels()
{
string sInFile = Helpers.GetTestBitmapPath("nature-greyscale.jpg");
using (Bitmap bmp = new Bitmap(sInFile))
{
// sampling values from a well known bitmap
- // Assert.Equal(-7697782, bmp.GetPixel(0, 0).ToArgb());
- // Assert.Equal(-12171706, bmp.GetPixel(0, 32).ToArgb());
+ Assert.Equal(-7697782, bmp.GetPixel(0, 0).ToArgb());
+ Assert.Equal(-12171706, bmp.GetPixel(0, 32).ToArgb());
Assert.Equal(-14013910, bmp.GetPixel(0, 64).ToArgb());
Assert.Equal(-15132391, bmp.GetPixel(0, 96).ToArgb());
Assert.Equal(-328966, bmp.GetPixel(32, 0).ToArgb());
}
}
- [ConditionalFact(Helpers.RecentGdiplusIsAvailable)]
+ [ConditionalFact(Helpers.GdiPlusIsAvailableNotWindows7)]
public void Bitmap8bbpIndexedGreyscaleData()
{
string sInFile = Helpers.GetTestBitmapPath("nature-greyscale.jpg");
{
byte* scan = (byte*)data.Scan0;
// sampling values from a well known bitmap
- // Assert.Equal(138, *(scan + 0));
- // Assert.Equal(203, *(scan + 1009));
+ Assert.Equal(138, *(scan + 0));
+ Assert.Equal(203, *(scan + 1009));
Assert.Equal(156, *(scan + 2018));
Assert.Equal(248, *(scan + 3027));
Assert.Equal(221, *(scan + 4036));