gdk-pixbuf crash

I am on Solaris 8 and am using Gtk+ 1.2, gdk_pixbuf 0.11.0, and jpeg-6b.

I am able to load in my jpeg with this code:

gdk_pixmap_new_from_file(const char *filename)
  GdkPixbuf *pixbuf;
  GdkPixmap *pixmap;

  pixbuf = gdk_pixbuf_new_from_file(filename);

  if (!pixbuf)
    g_print("Could not load `%s'!\n", filename);
    return NULL;

  g_print("File loaded...\n");

  gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, NULL, 1);


  return pixmap;

but when I try to use the resulting pixmap like this:

  pixmap_in = gdk_pixmap_new_from_file(s);

  gdk_draw_pixmap(pixmap, gc, pixmap_in, 1, 1, x, y, -1, -1);

I get the following crash:

File loaded...
Gdk-ERROR **: BadMatch (invalid parameter attributes)
  serial 111 error_code 8 request_code 62 minor_code 0

Any assistance on how to fix this problem would be greatly appreciated.


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