mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 05:25:28 +00:00
Merge pull request #229 from lytico/lytico/issues/226
PixbufSection.cs: ajdust writetestfile to work on windows
This commit is contained in:
commit
010116ef0d
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in a new issue