[GcodePreview]Keep thumbnails transparency (#15575)

* Makes Gcode thumbnails transparent

* Don't dispose MemoryStream used in Bitmap

Follows up on the remarks shown here:
https://docs.microsoft.com/en-us/dotnet/api/system.drawing.bitmap.-ctor?view=dotnet-plat-ext-6.0#system-drawing-bitmap-ctor(system-io-stream)
This commit is contained in:
Pedro Lamas
2022-01-24 18:12:48 +00:00
committed by GitHub
parent 2182aabe35
commit 5eaf60e8a2
3 changed files with 5 additions and 12 deletions

View File

@@ -31,7 +31,7 @@ namespace GcodeThumbnailProviderUnitTests
provider.GetThumbnail(256, out IntPtr bitmap, out WTS_ALPHATYPE alphaType);
Assert.IsTrue(bitmap != IntPtr.Zero);
Assert.IsTrue(alphaType == WTS_ALPHATYPE.WTSAT_RGB);
Assert.IsTrue(alphaType == WTS_ALPHATYPE.WTSAT_ARGB);
}
[TestMethod]