I have raw pixel data with simple boolean color (on = 1, off = 0). Essentially, a black and white image written in hex. I am trying to place this data on a GTK_IMAGE in my GUI using the following code (NOTE, c++):
GtkWidget *image
GdkPixbufLoader *loader;
const unsigned char hexData[] = {0x80, 0x00, 0x80, 0x00, etc}; //This will put evenly spaced pixels
gdk_pixbuf_loader_write(loader, hexData, strlen((char *)hexData), NULL);
gtk_image_set_from_pixbuf(GTK_IMAGE(image), gdk_pixbuf_loader_get_pixbuf(loader));
The application will compile and start correctly, but when accessing the method that contains this algorithm, I get the errors:
gdk_pixbuf_loader_write: assertion 'GDK_IS_PIXBUF_LOADER (loader)' failed
gdk_pixbuf_loader_get_pixbuf: assertion 'GDK_IS_PIXBUF_LOADER (loader)' failed
Anyone know where I am going wrong?