gtk2/demos/pixbuf-init.c
2003-08-02 21:35:44 +00:00

20 lines
354 B
C

#include <glib.h>
#include <sys/stat.h>
#include <stdlib.h>
static gboolean
file_exists (const char *filename)
{
struct stat statbuf;
return stat (filename, &statbuf) == 0;
}
void
pixbuf_init (void)
{
if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE);
}