Merge pull request #229 from lytico/lytico/issues/226

PixbufSection.cs: ajdust writetestfile to work on windows
This commit is contained in:
lytico 2021-03-18 21:05:44 +01:00 committed by GitHub
commit 010116ef0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
using System; using System;
using System.IO;
using System.Threading; using System.Threading;
using Gdk; using Gdk;
using Gtk; using Gtk;
@ -54,8 +55,9 @@ namespace Samples
var startmem = GC.GetTotalMemory (true); var startmem = GC.GetTotalMemory (true);
var testfile = "Textpic.png"; var testfile = "Textpic.png";
using (var writeTestFile = new Pixbuf (typeof(ImageSection).Assembly, "Testpic")) { using var teststream = typeof(ImageSection).Assembly.GetManifestResourceStream("Testpic");
writeTestFile.Save (testfile, "png"); using (var writeTestFile = new FileStream(testfile, FileMode.Create)) {
teststream.CopyTo(writeTestFile);
} }
using (var heatup = new Pixbuf (testfile)) { using (var heatup = new Pixbuf (testfile)) {