Re: Problem using gdk-pixbuf

You haven't called gtk_init (or gdk_init or gnome_init).  The most
reliable way to decode the colours in a XPM file is to ask the X server to
do it, which is impossible if you haven't initialised the connection.

it should be:

  main(int argc, char **argv) {
          gtk_init(&argc, &argv);
>         GdkPixbuf *pacman = gdk_pixbuf_new_from_xpm_data(pacman_xpm);
> }
> ------------------------------------------------------------------
> The pacman_xpm was generated by The Gimp. When I run this, it segfaults.
> Here is the backtrace.
> What's wrong?
> 	= L



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]