Frage

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!

War es hilfreich?

Lösung

While I cannot speak to this specifically, what seems to have happened is that I went home for the night and suspended my computer. When I came into work this morning and resumed my computer it seems to be working exactly as expected. I can only assume that the "suspend/resume" is equivalent to a reboot which has forced a correct reference to the base Gtk libraries. But this is only a guess. I miss linux :(

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top