/* Test program for bug of gdk-pixbuf 2.36.9

 Compile with
cc -Wall a.c `pkg-config --cflags gdk-2.0` `pkg-config --libs gdk-2.0`
*/

#include <gdk/gdkx.h>

void im_from_pixbuf_loader(char * image_name, int * has_alpha)
{
  GError    *error=NULL;
  GdkPixbuf *pixbuf_ori;

fprintf(stderr, "Launching gdk_pixbuf_new_from_file...\n");
  pixbuf_ori = gdk_pixbuf_new_from_file(image_name, &error);
fprintf(stderr, "Finished gdk_pixbuf_new_from_file\n");
  if (error != NULL)
  {
    fprintf(stderr, "Unable to read file: %s\n", error->message);
    g_error_free (error);
  }
}

int main(int argc, char * argv[])
{
int has_alpha= 0;

fprintf(stderr, "Loading \"%s\"\n", argv[1]);

g_print("Launching im_from_pixbuf_loader...\n");
im_from_pixbuf_loader( argv[1], &has_alpha);
g_print("Finished im_from_pixbuf_loader.\n");

return 0;
}
