-1

I am relatively new to GtkSharp and I am looking to use it in a windows application and I am just trying to perform a very simple operation of reading a image (tif image specifically) from the file system and displaying it to screen. I have tried many permutations of this but one would imagine that the following code snippet would work but when I execute it hangs indefinitely.

GtkImage myImage = new Gtk.Image(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read));

I also tried to read from a lower level object, namely the Gdk.Pixbuf object but it is showing the same behavior.

Gdk.Pixbuf myBuffer = new Gdk.Pixbuf(path);

I am not wed to this mindset so any advice would be highly appreciated!

Thanks!

4

1 回答 1

0

虽然我无法具体说明这一点,但似乎发生的事情是我晚上回家并暂停了我的电脑。当我今天早上上班并恢复我的电脑时,它似乎完全按预期工作。我只能假设“挂起/恢复”相当于重新启动,它强制正确引用基本 Gtk 库。但这只是一个猜测。我想念Linux :(

于 2013-07-04T13:07:04.543 回答