[Gtk-sharp-list] Gdk.Pixbuf Problem
Gonçal Carrero Puig
gcarrero@teklamedia.com
Sat, 25 Oct 2003 00:37:26 +0200
I'm making program that generates thumbnails and an html pages from my
digital photos, I began to have problems with pixbuf and finally I made
this test:
using System;
using System.IO;
using Gdk;
public class Album
{
public static void Main(string[] args)
{
Pixbuf image_pixbuf = new Pixbuf("./FXCD0001.JPG");
}
public Album()
{
}
}
When I execute the program the result is:
(album1.exe:23858): GLib-GObject-CRITICAL **: gtype.c:1871:
initialization assertion failed, use g_type_init() prior to this
function
(album1.exe:23858): GLib-GObject-CRITICAL **: file gobject.c: line 615
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed
Unhandled Exception: System.NullReferenceException: A null value was
found where an object instance was required
in (unmanaged) (wrapper managed-to-native)
Gdk.Pixbuf:gdk_pixbuf_new_from_file (string,intptr&)
in <0x00004> (wrapper managed-to-native)
Gdk.Pixbuf:gdk_pixbuf_new_from_file (string,intptr&)
in <0x00050> Gdk.Pixbuf:.ctor (string)
in [0x00005] (at /home/gcarrero/Programming/photo/album1.cs:14)
.Album:Main (string[])
I've other programs that make use of pixbuf and have no problem.
Anyone knows what's happening? Is ther something I'm missing or doing
wrong?
Thanks in Advance